Home > Language Reference > String Management Functions > Len

Len

The Len function returns the length of the specified string.

Usage

Used for example to check if a string contains non displayable characters.  

Syntax

var=Len(<source_string>)

Parameters

<source_string>, string to return the length for. 

Return value

var, integer, length of <source_string>.

See also

Asc
Chr$
Encrypt
ExtractBetween$
InStr
InStrRev
LCase$
Left$
LTrim$
Mid$
Replace$
Right$
RTrim$
SplitIntoArray
Str$
Trim$
UCase$
Val

Examples

a = Len("bcdefg") ' Returns 6

a = Len(var$)