unic_ucd_normal/
composition.rsuse unic_char_property::tables::CharDataTable;
pub mod data {
use crate::decomposition_type::long_names::*;
use crate::DecompositionType;
use unic_char_property::tables::CharDataTable;
pub const CANONICAL_COMPOSITION_MAPPING: CharDataTable<CharDataTable<char>> =
include!("../tables/canonical_composition_mapping.rsv");
pub const CANONICAL_DECOMPOSITION_MAPPING: CharDataTable<&[char]> =
include!("../tables/canonical_decomposition_mapping.rsv");
#[cfg_attr(rustfmt, rustfmt_skip)]
pub const COMPATIBILITY_DECOMPOSITION_MAPPING: CharDataTable<(DecompositionType, &[char])> =
include!("../tables/compatibility_decomposition_mapping.rsv");
}
pub fn canonical_composition(c: char) -> Option<CharDataTable<char>> {
data::CANONICAL_COMPOSITION_MAPPING.find(c)
}
pub fn canonical_decomposition(c: char) -> Option<&'static [char]> {
data::CANONICAL_DECOMPOSITION_MAPPING.find(c)
}
pub fn compatibility_decomposition(c: char) -> Option<&'static [char]> {
data::COMPATIBILITY_DECOMPOSITION_MAPPING
.find(c)
.map(|it| it.1)
}