ULENGTH16
ULENGTH16 returns a FIXED BINARY(31) value that is the length of a WIDECHAR string needed when the UTF characters held in a string were converted to UTF-16.
- x
- Expression. x must have CHARACTER or WIDECHAR type.
If x has CHAR type, then the string must contain valid UTF-8 data, and ULENGTH16 will return the length of the WIDECHAR string that would result if x were converted from UTF-8 to UTF-16. If the string does not contain valid UTF-8 data, the program is in error.
If x has WIDECHAR type, then ULENGTH16 is the same as LENGTH, and the string will not be checked for valid UTF-16 data.
For example, if x equals
the CHARACTER string '4b_c3_a4_73_65'x
, then ULENGTH16(x)
returns 4.