meco-core 0.4.1

Mongolian Encoding Converter — pure-by-default Rust library and CLI, ported from Java meco.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Unicode-block code-point classifiers.
//!
//! `mgl` (small, fully-specified sets/ranges) is hand-ported. The large membership sets of the
//! Z52 and Zvvnmod blocks are **generated** by `tools/table-gen` (dumped from the live Java sets)
//! and looked up here via binary search.

pub mod mgl;
pub mod z52;
pub mod zvvnmod;

/// Membership test on an ascending-sorted `char` slice. The generated tables are sorted, and
/// `tables::tests` guards that invariant, so binary search is valid.
#[inline]
pub(crate) fn sorted_contains(slice: &[char], c: char) -> bool {
    slice.binary_search(&c).is_ok()
}