CitectVBA Programming Reference > Understanding CitectVBA Language Basics > Strings | VBAReference

Strings

Strings can be stored in variables of string and variant. When using variant strings, be aware of type coercion in CitectVBA. Strings can be compared with each other in CitectVBA to determine whether they contain the same characters or not. Strings can be joined together to create longer strings in CitectVBA using the concatenation operator.

Strings can be searched using the:

To determine the length of a string, use the Len() function which returns a Long variable containing the number of characters in the string.

String characters can be converted to ASCII values using the Asc()function, and ASCII values can be converted to their string characters using the Chr()Function.

String characters can be converted to all lowercase or all uppercase using the Lcase() Function or the Ucase() Function respectively.

Leading or trailing spaces can be stripped off strings using the Ltrim()function or the Rtrim()function respectively.

Strings can be created consisting of a specified number of spaces or characters using the Space() function or the String() function respectively.

For syntax details of using string functions, see String Functions.

See Also

Operators

Numbers

Control Structures

Published June 2018