[Overview][Procedures and functions][Index] |
Gets the length for the specified value in UTF-16 characters.
Source position: lazutf16.pas line 39
function UTF16Length( |
const s: UnicodeString |
):PtrInt; overload; |
p: PWideChar; |
WordCount: PtrInt |
):PtrInt; overload; |
s |
|
Unicode string with the values examined in the routine. |
Number of UTF-16 codepoints in the examined value.
p |
|
Pointer to the WideChar values examined in the routine. |
WordCount |
|
Number of UTF-16 word values to examine in the Unicode string. |
UTF16Length is an overloaded PtrInt function used to get the length for the specified value as a number of Unicode code points. The overloaded variants allow the string examined in the routine to be specified as either a UnicodeString or a PWideChar type. The variant using PWideChar includes the WordCount argument with the number of Word values in the input.
UTF16Length examines the input values to determine the number of code points for the return value. Each code point can be represented as either 1 or 2 word values in UTF-16. The UTF16CharacterLength routine is called for the input until the number of Word values has been examined in the method. The return value is incremented by 1 for each code point read from the input value.
|
Gets the length of the UTF-16 character in the specified PWideChar value as a number Word values. |
Version 4.0 | Generated 2025-05-03 | Home |