Module

utils/unicode

@ckeditor/ckeditor5-utils/src/unicode

module

Set of utils to handle unicode characters.

Filtering

Functions

  • isCombiningMark( character ) → Boolean

    static

    Checks whether given character is a combining mark.

    Parameters

    character : String

    Character to check.

    Returns

    Boolean
  • isHighSurrogateHalf( character ) → Boolean

    static

    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

    static

    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
  • isInsideSurrogatePair( string, offset ) → Boolean

    static

    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

    static

    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