[Overview][Procedures and functions][Index] Reference for unit 'LazUTF16' (#lazutils)

UTF16Length

Gets the length for the specified value in UTF-16 characters.

Declaration

Source position: lazutf16.pas line 39

function UTF16Length(

  const s: widestring

):PtrInt; overload;

function UTF16Length(

  p: PWideChar;

  WordCount: PtrInt

):PtrInt; overload;

Arguments

s

  

Unicode string with the values examined in the routine.

Function result

Number of UTF-16 codepoints in the examined value.

Arguments

p

  

Pointer to the WideChar values examined in the routine.

WordCount

  

Number of UTF-16 word values to examine in the Unicode string.

Description

Examines 16-UTF values in the specified Unicode string until the number of word values is exceeded. Using zero (0) in WordCount causes no actions to be performed in the routine, and the return value is 0.


Version 3.2 Generated 2024-02-25 Home