Len

Description

Reports the length of a string in characters.

Syntax

Len ( string )

Argument

Description

string

The string for which you want the length


Return value

Long. Returns a long containing the length of string in characters if it succeeds and -1 if an error occurs.

Examples

This expression returns 0:

Len("")

This validation rule tests that the value the user entered is fewer than 20 characters:

Len(GetText()) < 20

See also

LenA

Len in the section called “Len” in PowerScript Reference