tree: bbd2031a6bb87e5709ad6c18467784dd13b595d9 [path history] [tgz]
  1. benches/
  2. src/
  3. tests/
  4. .cargo-checksum.json
  5. AUTHORS.md
  6. Cargo.toml
  7. LICENSE-APACHE
  8. LICENSE-MIT
  9. README.md
  10. RELEASES.md
third_party/rust_crates/vendor/encode_unicode/README.md

encode_unicode

UTF-8 and UTF-16 character types, iterators and related methods for char, u8 and u16.

crates.io page

Features

The minimum supported version of Rust is 1.15, older versions might work now but can break with a minor update.

Optional features

  • #![no_std]-mode: There are a few differences:
    • Error doesn't exist, but description() is made available as an inherent impl.
    • Extend/FromIterator-implementations for String/Vec<u8>/Vec<u16> are missing.
    • There is no io, so Utf8Iterator and Utf8CharSplitter doesn't implement Read. This feature is enabled by setting default-features=false in Cargo.toml: encode_unicode = {version="0.3.4", default-features=false}.
  • Integration with the ascii crate: Convert Utf8Char and Utf16Char to and from ascii::AsciiChar.

License

Licensed under either of

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.

History

The original purpose of this crate was to provide standins for the then unstable encode_utf8() and encode_utf16().
The standins were removed in 0.3 when Rust 1.15 stabilized the encode_
methods, but the other stuff I added, such as iterators like those `encode_utf{8,16}() returned for a while, might still be of use.