Dart String Iterable interface -
why doesn't dart string class implement iterable interface? seems there obvious notion of iteration strings, i.e. return each character in turn.
maybe not terse
string s = 'foo'; s.codeunits.foreach((f) => print(new string.fromcharcode(f))); s.runes.foreach((f) => print(new string.fromcharcode(f)));
Comments
Post a Comment