utils/unicode
@ckeditor/ckeditor5-utils/src/unicode
Set of utils to handle unicode characters.
Filtering
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
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.