Visual Basic language keywords and run-time library members are organized by
purpose and use.
Action Language element
Compare two strings. StrComp
Convert strings. StrConv
Reverse a string. InStrRev, StrReverse
Convert to lowercase or
Format, LCase, UCase
uppercase.
Create a string of repeating
Space, StrDup
characters.
Find the length of a string. Len
Format, FormatCurrency, FormatDateTime,
Format a string.
FormatNumber, FormatPercent
Manipulate strings. InStr, Left, LTrim, Mid, Right, RTrim, Trim
Set string comparison rules. Option Compare
Work with ASCII and
Asc, AscW, Chr, ChrW
ANSI values.
Replace a specified
Replace
substring.
Return a filter-based string
Filter
array.
Return a specified number
Split, Join
of substrings.
Quick Guide to String Functions
String operations Function(s)
Append two or more strings Format or "&"
Build a string from an array Join
Compare - normal StrComp or "="
Compare - pattern Like
Convert to a string CStr, Str
Simple: CDate
Convert string to date
Advanced: Format
Simple: CLng, CInt, CDbl, Val
Convert string to number
Advanced: Format
Convert to unicode, wide, narrow StrConv
String operations Function(s)
Convert to upper/lower case StrConv, UCase, LCase
Extract part of a string Left, Right, Mid
Format a string Format
Find characters in a string InStr, InStrRev
Generate a string String
Get length of a string Len
Remove blanks LTrim, RTrim, Trim
Replace part of a string Replace
Reverse a string StrReverse
Parse string to array Split