Crate mileage

Crate mileage 

Source
Expand description

Enjoy the efficient char range! Also provided are ways of working with noncontinuous sets of unicode codepoints as well as mapping unicode codepoints to values.

  • CharRange is a simple range of codepoints, effectively std::ops::RangeInclusive<char>.
  • CharSet is a set of codepoints handled as a sorted vector of compact ranges.
  • CharTrie is a static set of codepoints optimized for wide codepoint coverage.

§Features

  • set: Adds the CharSet type.
  • trie: Adds the CharTrie type.
  • map: Adds the CharMap reference types.
  • owned-set: Adds the CharSetBuf type.
  • new-trie: Adds code generation support for CharTries.
  • par-iter: Adds implementations of rayon::IntoParallelIterator.

§Examples

use mileage::CharRange;

for ch in CharRange::from('a'..='z') {
    // ch is each codepoint in lowercase ascii in sorted order
}

for ch in CharRange::from(..) {
    // ch is every valid char in sorted order
}

Re-exports§

pub use range::CharRange;

Modules§

map
Support for the CharMap family of types.
range
Support for the CharRange family of types.
set
Support for the CharSet family of types.
trie
Support for the CharTrie family of types.