Hide UTF-16 assumptions in the API. (#13) * Avoid the API depending on the underlying data being random-access UTF-16 code units. In this case, don't return `codeUnits` as a list of integers, but explicitly say `utf16CodeUnits` and return them as an iterable. That can be implemented as efficiently as possible on, say, a UTF-8 byte array. * Also use .characters in rest of example.
NOTE: This package is considered experimental, and breaking API changes are to be expected.
Characters are strings viewed as sequences of user-perceived characters, also know as Unicode (extended) grapheme clusters.
The Characters class allows access to the individual characters of a string, and a way to navigate back and forth between them using a CharacterRange.