Skip to content

happypdf / hasSurrogates

Function: hasSurrogates()

ts
function hasSurrogates(codePoint): boolean;

Defined in: src/utils/unicode.ts:251

Returns true if the given codePoint is valid and must be represented with a surrogate pair when encoded.

Parameters

ParameterTypeDescription
codePointnumberThe code point to be evaluated. Reference: https://en.wikipedia.org/wiki/UTF-16#Description

Returns

boolean

MIT Licensed. A fork of pdf-lib.