W3cubDocs

/Dart 2

currentAsString property

String 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 null if current is null.

Implementation

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

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-core/RuneIterator/currentAsString.html