type ucd_encodedrec = (u8, u8, u8, u8, u8); type ucd_record = struct { category: u8, combining: u8, bidirectional: u8, mirrored: u8, east_asian_width: u8, }; fn get_ucdrecord(rn: rune) *ucd_record = { const code = rn: u32; let index = 0u8; if (code < 0x110000) { index = index1[(code>>UCD_RECORD_SHIFT)]; index = index2[(index< return "Cc"; case gc::FORMAT => return "Cf"; case gc::UNASSIGNED => return "Cn"; case gc::PRIVATE_USE => return "Co"; case gc::SURROGATE => return "Cs"; case gc::LOWERCASE_LETTER => return "Ll"; case gc::MODIFIER_LETTER => return "Lm"; case gc::OTHER_LETTER => return "Lo"; case gc::TITLECASE_LETTER => return "Lt"; case gc::UPPERCASE_LETTER => return "Lu"; case gc::SPACING_MARK => return "Mc"; case gc::ENCLOSING_MARK => return "Me"; case gc::NON_SPACING_MARK => return "Mn"; case gc::DECIMAL_NUMBER => return "Nd"; case gc::LETTER_NUMBER => return "Nl"; case gc::OTHER_NUMBER => return "No"; case gc::CONNECT_PUNCTUATION => return "Pc"; case gc::DASH_PUNCTUATION => return "Pd"; case gc::CLOSE_PUNCTUATION => return "Pe"; case gc::FINAL_PUNCTUATION => return "Pf"; case gc::INITIAL_PUNCTUATION => return "Pi"; case gc::OTHER_PUNCTUATION => return "Po"; case gc::OPEN_PUNCTUATION => return "Ps"; case gc::CURRENCY_SYMBOL => return "Sc"; case gc::MODIFIER_SYMBOL => return "Sk"; case gc::MATH_SYMBOL => return "Sm"; case gc::OTHER_SYMBOL => return "So"; case gc::LINE_SEPARATOR => return "Zl"; case gc::PARAGRAPH_SEPARATOR => return "Zp"; case gc::SPACE_SEPARATOR => return "Zs"; }; };