Additional simplifications are possible after this: Many calls to ensure_type are no longer required. But I decided to keep this pull request focused on the bug fix.
First commits add unit tests
Next commits factor out a new helper str to be used where proper UTF-8 is required.
Last commit turns the panic into a failure in str.
Fixes #7 .
Additional simplifications are possible after this: Many calls to
ensure_type
are no longer required. But I decided to keep this pull request focused on the bug fix.str
to be used where proper UTF-8 is required.str
.