Name
StrLen -- return character length of a string
Synopsis
len = StrLen(str$[, encoding])
Function
This function returns the character length of str$. Note that for Unicode strings this isn't necessarily the same as the byte length of str$. To find out the byte length of a string, use the ByteLen() function or pass a non-Unicode encoding in encoding.

The optional encoding parameter can be used to set the character encoding to use. This defaults to the default string encoding set using SetDefaultEncoding(). See Character encodings for details.

Inputs
str$
input string
encoding
optional: character encoding to use (defaults to default string encoding) (V7.0)
Results
len
character length of string
Example
len = StrLen("Hello")
This will return 5.

Show TOC