STRING.getLength

Returns the length of the current string.

Syntax

getLength( )
       RETURNS INTEGER

Usage

This method counts the number of bytes or characters in a STRING variable.

Note: Unlike the LENGTH() function, the getLength() method counts the trailing blanks.

If the STRING variable is NULL, the method returns zero.

Important: When using byte length semantics, the length is expressed in bytes, and when using char length semantics, it is expressed in characters.

Example

MAIN
  DEFINE s STRING
  LET s = "Some text"
  DISPLAY s.getLength()
END MAIN
Output:
          9