module pkg::alloy::text::unicode::propertiessource
A code point's Unicode properties, from the generated tables, and UTF-8 decoding.
propertiesline_classgrapheme_classconjunct_classfoldDecodeddecodeencodedecompositioncompositioncombining_classscriptscript_extensionsBracketbracketscript_codegeneral_categoryjoining_typecomposed_hangul
fn propertiessource
exp fn properties(c: u32) -> u32
The packed value of the code point's properties (tables.alloy).
fn line_classsource
exp fn line_class(value: u32) -> u32
fn grapheme_classsource
exp fn grapheme_class(value: u32) -> u32
fn conjunct_classsource
exp fn conjunct_class(value: u32) -> u32
fn foldsource
exp fn fold(c: u32) -> u32
The code point's simple case folding (CaseFolding.txt's C and S): A
is a, Σ and ς are σ.
type Decodedsource
exp type Decoded = struct
A code point decoded and the bytes it took: an ill-formed sequence is U+FFFD taking one byte.
Fields
exp c: u32exp length: u64
fn decodesource
exp fn decode(text: &[u8], at: u64) -> Decoded
fn encodesource
exp fn encode(out: &var Vector<u8>, c: u32)
The code point as UTF-8, appended.
fn decompositionsource
exp fn decomposition(c: u32) -> Option<[u32 : 2]>
The code points the character canonically decomposes into, if it does: two, or one and 0.
fn compositionsource
exp fn composition(first: u32, second: u32) -> Option<u32>
The character the pair canonically composes into, if any (Hangul syllables left to composed_hangul).
fn combining_classsource
exp fn combining_class(c: u32) -> u32
The code point's canonical combining class, 0 for a starter.
fn scriptsource
exp fn script(c: u32) -> Script
The code point's Script (Unknown past Unicode's range).
fn script_extensionssource
exp fn script_extensions(c: u32) -> &[u8]
The scripts of the code point's Script_Extensions, when it has them (its value's SCRIPT_EXTENDED), as indices of Script; none otherwise.
type Bracketsource
exp type Bracket = struct
A paired bracket (BidiBrackets.txt): the bracket it pairs with, and whether it is the closing one.
Fields
exp other: u32exp closing: bool
fn bracketsource
exp fn bracket(c: u32) -> Option<Bracket>
fn script_codesource
exp fn script_code(s: Script) -> u32
The ISO 15924 code of the script, as 0x48616E69 for Hani.
fn general_categorysource
exp fn general_category(c: u32) -> GeneralCategory
The code point's General_Category.
fn joining_typesource
exp fn joining_type(c: u32) -> JoiningType
The code point's Joining_Type, X where ArabicShaping.txt lists none.
fn composed_hangulsource
exp fn composed_hangul(a: u32, b: u32) -> Option<u32>
The Hangul syllable a leading consonant and a vowel, or an LV syllable and a trailing consonant, compose into, if they do.