Len

Description

Reports the length of a string in characters.

Syntax

Len ( string )

Argument

Description

string

The string for which you want the length

Returns

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

Examples

Example 1

This expression returns 0:

Len("")

Example 2

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

Len(GetText()) < 20

See also