Crate utf8char

Source
Expand description

A UTF-8 encoded char.

This alternate representation of a char allows for certain benefits:

  • Deref to &str
  • Hash/Eq/Ord like &str
  • Smaller than &'static str for single codepoint cases (full const support included)
  • Some char methods are implementable without the performance loss of &str -> char -> &str (for instance in a str::chars() loop)

To get started, create a Utf8Char.

Re-exports§

pub use iter::Utf8CharIter;
pub use iter::IntoUtf8Chars;

Modules§

iter
Implements an Iterator on strings that provide Utf8Char’s

Structs§

Utf8Char
A single unicode codepoint encoded in utf8.