Sign in Join
FPDoc Onlineexperiment

UnicodeIsSurrogatePair function

In unit unicodedata

Check if a pair of UTF16 encoded characters is a valid surrogate pair.

Declaration

pascal
function UnicodeIsSurrogatePair(const AHighSurrogate: UnicodeChar; 
 const ALowSurrogate: UnicodeChar)
: Boolean

Arguments

AHighSurrogate

High character in the surrogate pair.

ALowSurrogate

Low character in the surrogate pair.

Function result

True if AHighSurrogate, ALowSurrogate are a valid surrogate pair.

Description

UnicodeIsSurrogatePair checks whether AHighSurrogate, ALowSurrogate constitute a valid surrogate pair, and returns True if this is the case. It does this by checking whether the values are within the bounds for high and low surrogate pairs.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.