Ustr - rhymes with Wooster.
Implements a string, with three design goals:
- Correct implementation of Unicode semantics.
- Support for as many of java's String and StringBuffer methods as
is reasonable.
- Support for the familiar null-terminated-string primitives
of the C programming language: strcpy() and friends.
A Ustr is a fairly thin wrapper around a byte[] array, which
contains null-terminated UTF8-encoded text.
Note that in the context of a Ustr, "index" always means how
many Unicode characters you are into the Ustr's text, while "offset"
always mean how many bytes you are into its UTF8 encoded form.
Similarly, "char" and "String" always refer to the Java constructs,
while "character" always means a Unicode character, always identified
by a Java int.
If any of the Ustr methods are passed an integer alleged to represent
a Unicode character whose value is not a valid code point, i.e. |