Len(), StringLength()
Summary
Returns the number of bytes or the number of Unicode symbols in a string.
Syntax
n = Len(string input_string)
| Argument | Contents |
|---|---|
| input_string | Any string |
Returns
An integer equal to the number of characters in input_string.
Notes
The program uses UTF-8 encoding for strings. A Unicode symbol therefore can be anywhere from 1 to 4 bytes long.
Non ASCII characters can be more than two bytes long, therefore the length of a string could be longer than the number of visible characters.
See Also
| Function | Summary |
|---|---|
| Substring() | Extracts a portion of a string |
| Left() | Returns the leftmost n characters of a string |
| Right() | Returns the rightmost n characters of a string |