utils/unicode
Functions
-
isCombiningMark( character ) → boolean
module:utils/unicode~isCombiningMark
Checks whether given
character
is a combining mark.Parameters
character : string
Character to check.
Returns
boolean
-
isHighSurrogateHalf( character ) → boolean
module:utils/unicode~isHighSurrogateHalf
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
module:utils/unicode~isInsideCombinedSymbol
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
module:utils/unicode~isInsideEmojiSequence
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
module:utils/unicode~isInsideSurrogatePair
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
module:utils/unicode~isLowSurrogateHalf
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