Tsallaka zuwa abun ciki
Justice Tech School

Characters and Runes

Strings are UTF-16. runes give code points and codeUnits give units.

Example
void main() {
  var s = "Hi";
  print(s.codeUnits);
  print(s.runes.toList());
  print(String.fromCharCode(65));
  print("a".codeUnitAt(0));
}

Exercise

Char code.

String.(65)

Quiz Test

What does codeUnitAt give?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.