utils/unicode

Api-module icon module

Functions

  • Chevron-right icon

    isCombiningMark( character ) → boolean

    Checks whether given character is a combining mark.

    Parameters

    character : string

    Character to check.

    Returns

    boolean
  • Chevron-right icon

    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
  • Chevron-right icon

    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
  • Chevron-right icon

    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
  • Chevron-right icon

    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
  • Chevron-right icon

    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