UTF-8 decode
This crates provides incremental UTF-8 decoders implementing the
Iterator trait, wrapping around u8 bytes iterators.
It also provide the const-compatible try_decode_char to decode UTF-8
byte streams, even in const contexts.
Decoder
The [Decoder] iterator can be used, for instance, to decode u8 slices.
use Decoder;
let bytes = ;
let decoder = new;
let mut string = Stringnew;
for c in decoder
println!;
TryDecoder
The TryDecoder iterator can be used, for instance, to decode UTF-8
encoded files.
use TryDecoder;
let file = open?;
let decoder = new;
let mut string = Stringnew;
for c in decoder
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.