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.
CharRangeis a simple range of codepoints, effectivelystd::ops::RangeInclusive<char>.CharSetis a set of codepoints handled as a sorted vector of compact ranges.CharTrieis a static set of codepoints optimized for wide codepoint coverage.
§Features
set: Adds theCharSettype.trie: Adds theCharTrietype.map: Adds theCharMapreference types.owned-set: Adds theCharSetBuftype.new-trie: Adds code generation support forCharTries.par-iter: Adds implementations ofrayon::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;