RuneOffsets class

Conversions between UTF-16 code unit and runes.

Constructors

RuneOffsets()

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 unit is the high half of a surrogate pair.
isLowSurrogate(int unit) → bool
Whether unit is 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 count runes past from.
snap(String text, int offset) → int
offset clamped to text and moved back to the start of the surrogate pair it points into.
splitsPair(String text, int at) → bool
Whether the code-unit offset at falls inside a surrogate pair of text.
utf16Offset(String text, int runeIndex) → int
UTF-16 code-unit offset at which the rune numbered runeIndex starts.