ucd/prepended_concatenation_mark/prepended_concatenation_mark.mbt1///|2/// Prepended_Concatenation_Mark lookup data3/// Generated from PropList.txt45///|6/// Prepended_Concatenation_Mark trie top level: `cp >> 10` to mid block index7let prepended_concatenation_mark_trie_top : Bytes = [8 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,9 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,12 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,13 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,14 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,15 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,16 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,17 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,18]1920///|21/// Prepended_Concatenation_Mark trie mid level: leaf block indices22let prepended_concatenation_mark_trie_mid : Bytes = [23 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0,24 0, 0, 0, 0, 0,25]2627///|28/// Prepended_Concatenation_Mark trie leaf level: bitsets of 128 code points, least significant bit first29let prepended_concatenation_mark_trie_leaf : Bytes = [30 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0,31 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 128, 0, 0,32 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0,33 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 32, 0, 0, 0, 0, 0, 0,34]3536///|37/// Check whether a character has the Unicode Prepended_Concatenation_Mark property38pub fn is_prepended_concatenation_mark(c : Char) -> Bool {39 let cp = c.to_int()40 if cp >= 0x40000 {41 return false42 }43 let mid = (prepended_concatenation_mark_trie_top[cp >> 10].to_int() << 3) |44 ((cp >> 7) & 7)45 let leaf = prepended_concatenation_mark_trie_mid[mid].to_int()46 let bits = prepended_concatenation_mark_trie_leaf[(leaf << 4) |47 ((cp >> 3) & 15)].to_int()48 ((bits >> (cp & 7)) & 1) != 049}50
///|
/// Prepended_Concatenation_Mark lookup data
/// Generated from PropList.txt
///|
/// Prepended_Concatenation_Mark trie top level: `cp >> 10` to mid block index
let prepended_concatenation_mark_trie_top : Bytes = [
0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
]
///|
/// Prepended_Concatenation_Mark trie mid level: leaf block indices
let prepended_concatenation_mark_trie_mid : Bytes = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0,
0, 0, 0, 0, 0,
]
///|
/// Prepended_Concatenation_Mark trie leaf level: bitsets of 128 code points, least significant bit first
let prepended_concatenation_mark_trie_leaf : Bytes = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 128, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 32, 0, 0, 0, 0, 0, 0,
]
///|
/// Check whether a character has the Unicode Prepended_Concatenation_Mark property
pub fn is_prepended_concatenation_mark(c : Char) -> Bool {
let cp = c.to_int()
if cp >= 0x40000 {
return false
}
let mid = (prepended_concatenation_mark_trie_top[cp >> 10].to_int() << 3) |
((cp >> 7) & 7)
let leaf = prepended_concatenation_mark_trie_mid[mid].to_int()
let bits = prepended_concatenation_mark_trie_leaf[(leaf << 4) |
((cp >> 3) & 15)].to_int()
((bits >> (cp & 7)) & 1) != 0
}