Unit 'LazUTF16' Package
[Overview][Procedures and functions][Index] [#lazutils]

UTF16CharacterLength

Gets the length of the UTF-16 character in the specified PWideChar value as a number Word values.

Declaration

Source position: lazutf16.pas line 38

function UTF16CharacterLength(

  p: PWideChar

):Integer;

Arguments

p

  

PWideChar value examined in the routine.

Function result

Length of the UTF-16 character in the specified value, or 0 when Nil.

Description

Uses the endian-ness for the platform. UTF16CharacterLength checks the first Word value in p to determine the return value for the routine, and can contain:

0
Returned when the value in the p argument is Nil.
1
Returned when the first Word value in p argument is outside the range $D800..$DFFF.
2
Returned when the first Word value in p argument is included in the range $D800..$DFFF.

Version 4.4 Generated 2025-11-08 Home