Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

ULENGTH

ULENGTH returns a FIXED BIN(31) value which is the number of UTF characters held in a string.

Read syntax diagramSkip visual syntax diagram>>-ULENGTH(x)--------------------------------------------------><
 
x
Expression which must have CHARACTER or WIDECHAR type.

If x has CHARACTER type, then the string must contain valid UTF-8 data. If not, the ERROR condition will be raised.

If x has WIDECHAR type, then the string must contain valid UTF-16 data. If not, the ERROR condition will be raised.

ULENGTH will return the number of UTF-8 or UTF-16 characters held in the CHAR or WIDECHAR argument, respectively. It does not return the number of characters if the string were normalized. So, for example, in UTF-8, a lowercase a umlaut may be represented in the normalized or canonical form via the string 'c3_a4'x or in the unnormalized or combining form as '61_cc_88'x, but ULENGTH will return 1 for the string 'c3_a4'x and 2 for the string '61_cc_88'x.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)