RuneIterator.at constructor

RuneIterator.at(String string, int index)

Create an iterator positioned before the indexth code unit of the string.

When created, there is no current value. A moveNext will use the rune starting at index the current value, and a movePrevious will use the rune ending just before index as the the current value.

The index position must not be in the middle of a surrogate pair.

Source

RuneIterator.at(String string, int index)
    : string = string,
      _position = index,
      _nextPosition = index {
  RangeError.checkValueInInterval(index, 0, string.length);
  _checkSplitSurrogate(index);
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-core/RuneIterator/RuneIterator.at.html