Module

utils/unicode

@ckeditor/ckeditor5-utils/src/unicode

module

Filtering

Functions

  • isCombiningMark( character ) → boolean

    Checks whether given character is a combining mark.

    Parameters

    character : string

    Character to check.

    Returns

    boolean
  • isHighSurrogateHalf( character ) → boolean

    Checks whether given character is a high half of surrogate pair.

    Using UTF-16 terminology, a surrogate pair denotes UTF-16 character using two UTF-8 characters. The surrogate pair consist of high surrogate pair character followed by low surrogate pair character.

    Parameters

    character : string

    Character to check.

    Returns

    boolean
  • isInsideCombinedSymbol( string, offset ) → boolean

    Checks whether given offset in a string is between base character and combining mark or between two combining marks.

    Parameters

    string : string

    String to check.

    offset : number

    Offset to check.

    Returns

    boolean
  • isInsideEmojiSequence( string, offset ) → boolean

    Checks whether given offset in a string is inside multi-character emoji sequence.

    Parameters

    string : string

    String to check.

    offset : number

    Offset to check.

    Returns

    boolean
  • isInsideSurrogatePair( string, offset ) → boolean

    Checks whether given offset in a string is inside a surrogate pair (between two surrogate halves).

    Parameters

    string : string

    String to check.

    offset : number

    Offset to check.

    Returns

    boolean
  • isLowSurrogateHalf( character ) → boolean

    Checks whether given character is a low half of surrogate pair.

    Using UTF-16 terminology, a surrogate pair denotes UTF-16 character using two UTF-8 characters. The surrogate pair consist of high surrogate pair character followed by low surrogate pair character.

    Parameters

    character : string

    Character to check.

    Returns

    boolean