Dart strings are immutable sequences of UTF-16 code units. The language and standard library treat strings specially - as containers of text encoded in UTF-16. In Dart, the concept of a character is represented by a String of length 1, which corresponds to a single Unicode code point.
To run the program, save it as strings_and_runes.dart and use dart run:
This Dart code demonstrates how to work with strings and Unicode code points (runes) in Dart. It shows string length, iterating over code units, counting and iterating over runes, and examining individual runes. The concepts are similar to the original example, but adapted to Dart’s string handling and Unicode support.