utf8_iter provides iteration by char
over potentially-invalid UTF-8 &[u8]
such that UTF-8 errors are handled according to the WHATWG Encoding Standard.
Key parts of the code are copypaste from the UTF-8 to UTF-16 conversion code
in encoding_rs
, which was optimized for speed in the case of valid input.
The implementation here uses the structure that was found to be fast in the
encoding_rs
context but the structure hasn't been benchmarked in this
context.
At present, DoubleEndedIterator
is not implemented, but it could be
implemented in the future.
This is a no_std
crate.
TL;DR: Apache-2.0 OR MIT
Please see the file named COPYRIGHT.
Generated API documentation is available online.
The initial release.