utils/unicode
Functions
isCombiningMark( character ) → booleanmodule:utils/unicode~isCombiningMarkChecks whether given
characteris a combining mark.Parameters
character : stringCharacter to check.
Returns
boolean
isHighSurrogateHalf( character ) → booleanmodule:utils/unicode~isHighSurrogateHalfChecks whether given
characteris 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 : stringCharacter to check.
Returns
boolean
isInsideCombinedSymbol( string, offset ) → booleanmodule:utils/unicode~isInsideCombinedSymbolChecks whether given offset in a string is between base character and combining mark or between two combining marks.
Parameters
string : stringString to check.
offset : numberOffset to check.
Returns
boolean
isInsideEmojiSequence( string, offset ) → booleanmodule:utils/unicode~isInsideEmojiSequenceChecks whether given offset in a string is inside multi-character emoji sequence.
Parameters
string : stringString to check.
offset : numberOffset to check.
Returns
boolean
isInsideSurrogatePair( string, offset ) → booleanmodule:utils/unicode~isInsideSurrogatePairChecks whether given offset in a string is inside a surrogate pair (between two surrogate halves).
Parameters
string : stringString to check.
offset : numberOffset to check.
Returns
boolean
isLowSurrogateHalf( character ) → booleanmodule:utils/unicode~isLowSurrogateHalfChecks whether given
characteris 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 : stringCharacter to check.
Returns
boolean