charlen
Description
The charlen() function returns the number of characters (single-byte or multiple-byte) in the argument string.
By contrast, the length() function returns the number of bytes in a string, which equals the number of characters only for single-byte character encodings. Also in contrast to the length() function, the charlen() function does not accept a list as an argument.
Syntax
result = charlen (string)
Arguments
string |
Required. A character string in single-byte or multiple-byte encoding. |
Return Values
result Contains an integer that indicates the number of characters in string.
string = "BeyondTrust Software";
howLong = charlen(string);
In this example, the howLong variable contains the integer value 20.
For more information, see length.