RuneOffsets class
Conversions between UTF-16 code unit and runes.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
isHighSurrogate(
int unit) → bool -
Whether
unitis the high half of a surrogate pair. -
isLowSurrogate(
int unit) → bool -
Whether
unitis the low half of a surrogate pair. -
length(
String text) → int -
Number of runes in
text. -
runeIndex(
String text, int utf16Offset) → int -
Index of the rune that starts at
utf16Offset. -
skip(
String text, int from, int count) → int -
UTF-16 code-unit offset
countrunes pastfrom. -
snap(
String text, int offset) → int -
offsetclamped totextand moved back to the start of the surrogate pair it points into. -
splitsPair(
String text, int at) → bool -
Whether the code-unit offset
atfalls inside a surrogate pair oftext. -
utf16Offset(
String text, int runeIndex) → int -
UTF-16 code-unit offset at which the rune numbered
runeIndexstarts.