characterLen()

The strLib.characterLen() system function returns the number of characters in a text expression, excluding any trailing spaces. In contrast, strLib.byteLen() returns the number of bytes rather than the number of characters. See the example later in this topic.

Syntax

  strLib.characterLen(source STRING in)
  returns (result INT)
source
Input can be any variable or expression that is assignment compatible with the STRING type (see "Assignment compatibility in EGL").
result
A variable defined as an INT.

Example

  myUnicode5 UNICODE(5) = "ABC";
  length INT;

  length = strLib.byteLen(myUnicode5); // length=6
  length = strLib.characterLen(myUnicode5); // length=3  

Feedback