Official Content

Returns the number of characters in a character expression.

Syntax

Len(Character-Expression)

Where:
Character-Expression
    Must be a Character Expression.

Type Returned:
Numeric

Scope

Objects: Procedure, Transaction, Web PanelWork Panel
Generators: .NET, Java, RPG, Cobol, Visual FoxPro (up to GeneXus X Evolution 3), Ruby (up to GeneXus X Evolution 3)

Description

The Len function returns the number of characters in a character expression. Trailing blanks are ignored.

Samples

Event 'Len function test'
     &CharExp = 'HELLO'
     &Length = Len(&CharExp)
     msg(Str(&Length,1))        //The shown result is: 5     
Endevent
- &CharExp: Character(20)
- &Length: Numeric(1)

See Also

Length method









Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant