currentAsString property

String get currentAsString

A string containing the current rune.

For runes outside the basic multilingual plane, this will be a String of length 2, containing two code units.

Returns an empty string if there is no current value.

Implementation

String get currentAsString {
  if (_position == _nextPosition) return "";
  if (_position + 1 == _nextPosition) return string[_position];
  return string.substring(_position, _nextPosition);
}