unicode

Branch: main

Switch branches or tags

Branch: main
Go to file t

413 files indexed

History
Code

ucd/emoji/emoji.mbt
1///|2/// Extended_Pictographic, Emoji_Presentation, Emoji_Modifier, Emoji_Modifier_Base, and emoji variation sequence lookup data3/// Generated from emoji-data.txt and emoji-variation-sequences.txt45///|6/// Extended_Pictographic trie top level: `cp >> 10` to mid block index7let extended_pictographic_trie_top : Bytes = [8  0, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,9  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,10  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,11  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,12  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 8, 9, 1, 1, 1, 1, 1, 1, 1,13  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,14  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,15  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,16  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,17  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,18]1920///|21/// Extended_Pictographic trie mid level: leaf block indices22let extended_pictographic_trie_mid : Bytes = [23  0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 3, 4, 0, 0, 5, 6, 0, 7, 0,24  8, 9, 10, 11, 12, 0, 0, 13, 0, 0, 0, 14, 0, 15, 0, 0, 0, 0, 16, 0, 0, 17, 18, 19,25  20, 21, 22, 23, 24, 22, 25, 26, 27, 28, 29, 0, 30, 31, 32, 33, 22, 34, 22, 0, 0,26  22, 22, 22, 22, 22, 22, 22, 35,27]2829///|30/// Extended_Pictographic trie leaf level: bitsets of 128 code points, least significant bit first31let extended_pictographic_trie_leaf : Bytes = [32  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0,33  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,34  4, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 3, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0,35  0, 0, 0, 0, 0, 12, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,36  0, 128, 0, 0, 0, 254, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0,37  0, 0, 0, 0, 12, 64, 0, 1, 0, 0, 0, 0, 0, 0, 120, 31, 64, 50, 33, 77, 196, 0, 7,38  5, 255, 15, 128, 105, 1, 0, 200, 0, 0, 252, 26, 131, 12, 3, 96, 48, 193, 26, 0,39  0, 6, 191, 39, 36, 191, 84, 32, 2, 1, 24, 0, 144, 80, 184, 0, 24, 0, 0, 0, 0, 0,40  224, 0, 2, 0, 1, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0,41  0, 0, 0, 0, 0, 224, 0, 0, 24, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0,42  0, 0, 1, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,43  0, 0, 16, 0, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 255, 0, 128,44  1, 0, 1, 128, 1, 0, 0, 0, 192, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,45  192, 0, 64, 254, 7, 0, 128, 255, 255, 255, 255, 255, 255, 63, 0, 0, 0, 254, 255,46  0, 4, 0, 128, 252, 247, 0, 254, 255, 255, 192, 255, 255, 255, 255, 255, 255, 255,47  255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,48  243, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 207, 206,49  255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 185, 7, 255, 255, 255, 255, 255,50  255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 191, 255, 255, 255, 255, 255,51  255, 255, 63, 0, 126, 255, 255, 255, 128, 249, 7, 128, 60, 97, 0, 48, 1, 6, 16,52  28, 0, 14, 112, 10, 129, 8, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,53  0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 63, 248, 231, 255, 63,54  250, 249, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 255, 255, 1, 0, 0, 240, 0,55  0, 0, 0, 0, 0, 0, 255, 0, 252, 0, 0, 0, 0, 0, 255, 0, 0, 0, 192, 0, 240, 252, 255,56  0, 254, 255, 255, 255, 255, 0, 240, 255, 255, 255, 255, 255, 247, 191, 255, 255,57  255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 192, 255, 255,58  255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 63,59]6061///|62/// Check whether a character has the Unicode Extended_Pictographic property63pub fn is_extended_pictographic(c : Char) -> Bool {64  let cp = c.to_int()65  if cp >= 0x40000 {66    return false67  }68  let mid = (extended_pictographic_trie_top[cp >> 10].to_int() << 3) |69    ((cp >> 7) & 7)70  let leaf = extended_pictographic_trie_mid[mid].to_int()71  let bits = extended_pictographic_trie_leaf[(leaf << 4) | ((cp >> 3) & 15)].to_int()72  ((bits >> (cp & 7)) & 1) != 073}7475///|76/// Emoji_Presentation trie top level: `cp >> 10` to mid block index77let emoji_presentation_trie_top : Bytes = [78  0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,79  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,80  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,81  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,82  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0,83  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,84  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,85  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,86  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,87  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,88]8990///|91/// Emoji_Presentation trie mid level: leaf block indices92let emoji_presentation_trie_mid : Bytes = [93  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 3, 4, 5, 6, 7, 0, 0, 0,94  0, 0, 0, 8, 0, 9, 10, 0, 11, 12, 0, 13, 14, 15, 16, 17, 18, 19, 20, 0, 21, 0, 0,95  22, 23, 24, 25, 0, 0,96]9798///|99/// Emoji_Presentation trie leaf level: bitsets of 128 code points, least significant bit first100let emoji_presentation_trie_leaf : Bytes = [101  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,102  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 9, 0, 0, 0, 0, 0,103  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 0, 0, 48, 0, 0, 0, 0, 0, 0, 255, 15, 0, 0,104  0, 0, 128, 0, 0, 8, 0, 2, 12, 0, 96, 48, 64, 16, 0, 0, 4, 44, 36, 32, 12, 0, 0,105  0, 1, 0, 0, 0, 80, 184, 0, 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, 1, 128, 0, 0, 0, 0,106  0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,107  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0,108  0, 64, 254, 7, 0, 0, 0, 0, 0, 0, 0, 0, 192, 255, 255, 255, 2, 0, 0, 4, 0, 128,109  124, 7, 0, 0, 3, 0, 0, 0, 0, 0, 255, 255, 255, 255, 1, 224, 191, 255, 255, 255,110  255, 255, 255, 255, 255, 223, 255, 255, 15, 0, 255, 255, 255, 255, 255, 135, 15,111  0, 255, 255, 17, 255, 255, 255, 255, 255, 255, 255, 255, 127, 253, 255, 255, 255,112  255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,113  255, 255, 255, 159, 255, 255, 255, 255, 255, 255, 255, 63, 0, 120, 255, 255, 255,114  0, 0, 4, 0, 0, 96, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 255, 255, 255, 255,115  255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255,116  255, 63, 16, 231, 243, 0, 24, 240, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255,117  15, 1, 0, 0, 240, 255, 255, 255, 255, 255, 247, 191, 255, 255, 255, 255, 255, 255,118  255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,119  255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 31, 255, 255, 255, 255, 255,120  255, 255, 255, 127, 241, 255, 191, 255, 143, 255, 7,121]122123///|124/// Check whether a character has the Unicode Emoji_Presentation property125pub fn is_emoji_presentation(c : Char) -> Bool {126  let cp = c.to_int()127  if cp >= 0x40000 {128    return false129  }130  let mid = (emoji_presentation_trie_top[cp >> 10].to_int() << 3) |131    ((cp >> 7) & 7)132  let leaf = emoji_presentation_trie_mid[mid].to_int()133  let bits = emoji_presentation_trie_leaf[(leaf << 4) | ((cp >> 3) & 15)].to_int()134  ((bits >> (cp & 7)) & 1) != 0135}136137///|138/// Emoji_Modifier trie top level: `cp >> 10` to mid block index139let emoji_modifier_trie_top : Bytes = [140  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,141  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,142  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,143  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,144  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,145  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,146  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,147  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,148  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,149  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,150]151152///|153/// Emoji_Modifier trie mid level: leaf block indices154let emoji_modifier_trie_mid : Bytes = [155  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,156]157158///|159/// Emoji_Modifier trie leaf level: bitsets of 128 code points, least significant bit first160let emoji_modifier_trie_leaf : Bytes = [161  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,162  0, 0, 0, 0, 248,163]164165///|166/// Check whether a character has the Unicode Emoji_Modifier property167pub fn is_emoji_modifier(c : Char) -> Bool {168  let cp = c.to_int()169  if cp >= 0x40000 {170    return false171  }172  let mid = (emoji_modifier_trie_top[cp >> 10].to_int() << 3) | ((cp >> 7) & 7)173  let leaf = emoji_modifier_trie_mid[mid].to_int()174  let bits = emoji_modifier_trie_leaf[(leaf << 4) | ((cp >> 3) & 15)].to_int()175  ((bits >> (cp & 7)) & 1) != 0176}177178///|179/// Emoji_Modifier_Base trie top level: `cp >> 10` to mid block index180let emoji_modifier_base_trie_top : Bytes = [181  0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,182  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,183  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,184  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,185  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0,186  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,187  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,188  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,189  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,190  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191]192193///|194/// Emoji_Modifier_Base trie mid level: leaf block indices195let emoji_modifier_base_trie_mid : Bytes = [196  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 6, 7,197  8, 9, 10, 0, 0, 0, 0, 11, 12, 0, 13, 0, 0,198]199200///|201/// Emoji_Modifier_Base trie leaf level: bitsets of 128 code points, least significant bit first202let emoji_modifier_base_trie_leaf : Bytes = [203  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, 0,204  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 60, 0, 0,205  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 156, 28, 0, 0, 0,206  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, 255, 1, 0, 192, 255, 255, 17, 238, 128, 2,207  0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,208  48, 4, 0, 0, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,209  224, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 112, 0, 1, 16, 0, 0, 0, 0, 0, 0,210  0, 144, 0, 255, 64, 0, 255, 115, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 96,211  11, 0, 224, 254, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 255,212  7,213]214215///|216/// Check whether a character has the Unicode Emoji_Modifier_Base property217pub fn is_emoji_modifier_base(c : Char) -> Bool {218  let cp = c.to_int()219  if cp >= 0x40000 {220    return false221  }222  let mid = (emoji_modifier_base_trie_top[cp >> 10].to_int() << 3) |223    ((cp >> 7) & 7)224  let leaf = emoji_modifier_base_trie_mid[mid].to_int()225  let bits = emoji_modifier_base_trie_leaf[(leaf << 4) | ((cp >> 3) & 15)].to_int()226  ((bits >> (cp & 7)) & 1) != 0227}228229///|230/// Emoji_Variation_Sequence trie top level: `cp >> 10` to mid block index231let emoji_variation_sequence_trie_top : Bytes = [232  0, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,233  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,234  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,235  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,236  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1,237  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,238  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,239  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,240  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,241  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,242]243244///|245/// Emoji_Variation_Sequence trie mid level: leaf block indices246let emoji_variation_sequence_trie_mid : Bytes = [247  0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 4, 5, 2, 2, 6, 7, 2, 8, 2,248  9, 10, 11, 12, 13, 2, 2, 14, 2, 2, 2, 15, 2, 16, 2, 2, 2, 2, 17, 2, 2, 18, 2, 19,249  2, 20, 2, 21, 22, 23, 24, 25, 26, 27, 28, 2, 2,250]251252///|253/// Emoji_Variation_Sequence trie leaf level: bitsets of 128 code points, least significant bit first254let emoji_variation_sequence_trie_leaf : Bytes = [255  0, 0, 0, 0, 8, 4, 255, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0,256  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,257  0, 0, 16, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,258  0, 0, 0, 240, 3, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 1, 0, 0, 0,259  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 254, 15, 7, 0, 0,260  0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 64, 0, 1, 0, 0, 0,261  0, 0, 0, 120, 31, 64, 50, 33, 77, 196, 0, 7, 5, 255, 15, 128, 105, 1, 0, 200, 0,262  0, 252, 26, 131, 12, 3, 96, 48, 193, 26, 0, 0, 6, 191, 39, 36, 191, 84, 32, 2,263  1, 24, 0, 144, 80, 184, 0, 24, 0, 0, 0, 0, 0, 224, 0, 2, 0, 1, 128, 0, 0, 0, 0,264  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 0, 0, 24, 0,265  0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 32, 0, 0, 0, 0, 0, 0, 0,266  0, 0, 0, 128, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0,267  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 192, 4, 0, 0,268  4, 0, 128, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 32, 16, 242, 31, 64, 0, 0, 0,269  0, 0, 0, 0, 0, 33, 0, 0, 200, 206, 128, 112, 0, 0, 84, 124, 240, 255, 1, 32, 168,270  0, 0, 1, 32, 128, 64, 0, 0, 128, 198, 99, 8, 0, 0, 4, 0, 32, 0, 0, 0, 0, 8, 0,271  9, 136, 0, 8, 0, 132, 112, 60, 128, 46, 0, 33, 12, 0, 0, 0, 0, 0, 0, 6, 255, 255,272  255, 128, 249, 3, 128, 60, 1, 0, 32, 1, 6, 16, 28, 0, 14, 112, 10, 129, 8, 4, 0,273  0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 32, 18, 1, 0, 32, 4, 22, 0, 232,274  0, 0, 63, 2, 9, 0,275]276277///|278/// Check whether a character starts an emoji variation sequence279pub fn has_emoji_variation_sequence(c : Char) -> Bool {280  let cp = c.to_int()281  if cp >= 0x40000 {282    return false283  }284  let mid = (emoji_variation_sequence_trie_top[cp >> 10].to_int() << 3) |285    ((cp >> 7) & 7)286  let leaf = emoji_variation_sequence_trie_mid[mid].to_int()287  let bits = emoji_variation_sequence_trie_leaf[(leaf << 4) | ((cp >> 3) & 15)].to_int()288  ((bits >> (cp & 7)) & 1) != 0289}290