Length Method

Official Content
This documentation is valid for:

Returns the number of characters in a character expression.

Syntax

Character-Expression.Length()
Type Returned:
Numeric

Where:
Character-Expression
   Must be a character expression.

Description

The Length method returns the number of characters in a character expression. Trailing blanks are ignored.

Example

&Text = "Length method test"   

&Nbr = &Text.Length()   // Result: 18

&Text = " Length method test " 
&Nbr = &Text.Length()   // Result: 19

Scope

Objects: Procedures, Transactions, Web Panels
Languages: .NET, Ruby (up to GeneXus X Evolution 3), Java, RPG, Visual FoxPro (up to GeneXus X Evolution 3), Cobol

See Also

Len Function