package unidata
import "zgo.at/uni/v2/unidata"
Package unidata contains information about the Unicode database.
This is an alternative to Go's unicode package in stdlib and provides some additional data. In particular, it knows a bit more about codepoints and knows about emojis.
The downside is that this package is a bit slower, uses more memory, and increases the binary size by about 2M. It should still be plenty fast enough for most use cases.
This is updated to Unicode 14.0 (September 2021).
NOTE: be careful in mixing this package and the stdlib unicode package; it usually takes a while before the tables in there are updated, and may result in inconsistent results. For example, unicode.IsPrint() will return false even for printable characters if it doesn't know about them. As of Go 1.18, unicode is using Unicode 13.0. The unicode/utf8 and unicode/utf16 are fine, as they just deal with the byte encodings.
Index ¶
- Constants
- Variables
- type Block
- type Category
- type Codepoint
- func Find(cp rune) (Codepoint, bool)
- func FromString(s string) (Codepoint, error)
- func (c Codepoint) Aliases() []string
- func (c Codepoint) Block() Block
- func (c Codepoint) Category() Category
- func (c Codepoint) Cells() uint8
- func (c Codepoint) Digraph() string
- func (c Codepoint) Display() string
- func (c Codepoint) Format(base int) string
- func (c Codepoint) FormatCodepoint() string
- func (c Codepoint) HTML() string
- func (c Codepoint) JSON() string
- func (c Codepoint) KeySym() string
- func (c Codepoint) Name() string
- func (c Codepoint) Plane() Plane
- func (c Codepoint) Properties() PropertyList
- func (c Codepoint) Refs() []string
- func (c Codepoint) Script() Script
- func (c Codepoint) String() string
- func (c Codepoint) UTF16(bigEndian bool) []byte
- func (c Codepoint) UTF8() []byte
- func (c Codepoint) Unicode() Unicode
- func (c Codepoint) Width() Width
- func (c Codepoint) XML() string
- type Emoji
- func (e Emoji) Genders() bool
- func (e Emoji) Group() EmojiGroup
- func (e Emoji) Skintones() bool
- func (e Emoji) String() string
- func (e Emoji) Subgroup() EmojiSubgroup
- func (e Emoji) With(mod EmojiModifier, selmod ...EmojiModifier) Emoji
- type EmojiGroup
- type EmojiModifier
- type EmojiSubgroup
- type Plane
- type Property
- type PropertyList
- type Script
- type Unicode
- type Width
Constants ¶
const ( ModPerson = EmojiModifier(1 << iota) // Gender-neutral "person". ModMale // Male ModFemale // Female ModNone // No skin tone ModLight // Light skin tone ModMediumLight // Medium light skin tone ModMedium // Medium skin tone ModMediumDark // Mediun dark skin tone ModDark // Dark skin tone )
EmojiModifier values.
const ( BlockUnknown = Block(iota) BlockBasicLatin BlockLatin1Supplement BlockLatinExtendedA BlockLatinExtendedB BlockIPAExtensions BlockSpacingModifierLetters BlockCombiningDiacriticalMarks BlockGreekandCoptic BlockCyrillic BlockCyrillicSupplement BlockArmenian BlockHebrew BlockArabic BlockSyriac BlockArabicSupplement BlockThaana BlockNKo BlockSamaritan BlockMandaic BlockSyriacSupplement BlockArabicExtendedB BlockArabicExtendedA BlockDevanagari BlockBengali BlockGurmukhi BlockGujarati BlockOriya BlockTamil BlockTelugu BlockKannada BlockMalayalam BlockSinhala BlockThai BlockLao BlockTibetan BlockMyanmar BlockGeorgian BlockHangulJamo BlockEthiopic BlockEthiopicSupplement BlockCherokee BlockUnifiedCanadianAboriginalSyllabics BlockOgham BlockRunic BlockTagalog BlockHanunoo BlockBuhid BlockTagbanwa BlockKhmer BlockMongolian BlockUnifiedCanadianAboriginalSyllabicsExtended BlockLimbu BlockTaiLe BlockNewTaiLue BlockKhmerSymbols BlockBuginese BlockTaiTham BlockCombiningDiacriticalMarksExtended BlockBalinese BlockSundanese BlockBatak BlockLepcha BlockOlChiki BlockCyrillicExtendedC BlockGeorgianExtended BlockSundaneseSupplement BlockVedicExtensions BlockPhoneticExtensions BlockPhoneticExtensionsSupplement BlockCombiningDiacriticalMarksSupplement BlockLatinExtendedAdditional BlockGreekExtended BlockGeneralPunctuation BlockSuperscriptsandSubscripts BlockCurrencySymbols BlockCombiningDiacriticalMarksforSymbols BlockLetterlikeSymbols BlockNumberForms BlockArrows BlockMathematicalOperators BlockMiscellaneousTechnical BlockControlPictures BlockOpticalCharacterRecognition BlockEnclosedAlphanumerics BlockBoxDrawing BlockBlockElements BlockGeometricShapes BlockMiscellaneousSymbols BlockDingbats BlockMiscellaneousMathematicalSymbolsA BlockSupplementalArrowsA BlockBraillePatterns BlockSupplementalArrowsB BlockMiscellaneousMathematicalSymbolsB BlockSupplementalMathematicalOperators BlockMiscellaneousSymbolsandArrows BlockGlagolitic BlockLatinExtendedC BlockCoptic BlockGeorgianSupplement BlockTifinagh BlockEthiopicExtended BlockCyrillicExtendedA BlockSupplementalPunctuation BlockCJKRadicalsSupplement BlockKangxiRadicals BlockIdeographicDescriptionCharacters BlockCJKSymbolsandPunctuation BlockHiragana BlockKatakana BlockBopomofo BlockHangulCompatibilityJamo BlockKanbun BlockBopomofoExtended BlockCJKStrokes BlockKatakanaPhoneticExtensions BlockEnclosedCJKLettersandMonths BlockCJKCompatibility BlockCJKUnifiedIdeographsExtensionA BlockYijingHexagramSymbols BlockCJKUnifiedIdeographs BlockYiSyllables BlockYiRadicals BlockLisu BlockVai BlockCyrillicExtendedB BlockBamum BlockModifierToneLetters BlockLatinExtendedD BlockSylotiNagri BlockCommonIndicNumberForms BlockPhagspa BlockSaurashtra BlockDevanagariExtended BlockKayahLi BlockRejang BlockHangulJamoExtendedA BlockJavanese BlockMyanmarExtendedB BlockCham BlockMyanmarExtendedA BlockTaiViet BlockMeeteiMayekExtensions BlockEthiopicExtendedA BlockLatinExtendedE BlockCherokeeSupplement BlockMeeteiMayek BlockHangulSyllables BlockHangulJamoExtendedB BlockHighSurrogates BlockHighPrivateUseSurrogates BlockLowSurrogates BlockPrivateUseArea BlockCJKCompatibilityIdeographs BlockAlphabeticPresentationForms BlockArabicPresentationFormsA BlockVariationSelectors BlockVerticalForms BlockCombiningHalfMarks BlockCJKCompatibilityForms BlockSmallFormVariants BlockArabicPresentationFormsB BlockHalfwidthandFullwidthForms BlockSpecials BlockLinearBSyllabary BlockLinearBIdeograms BlockAegeanNumbers BlockAncientGreekNumbers BlockAncientSymbols BlockPhaistosDisc BlockLycian BlockCarian BlockCopticEpactNumbers BlockOldItalic BlockGothic BlockOldPermic BlockUgaritic BlockOldPersian BlockDeseret BlockShavian BlockOsmanya BlockOsage BlockElbasan BlockCaucasianAlbanian BlockVithkuqi BlockTodhri BlockLinearA BlockLatinExtendedF BlockCypriotSyllabary BlockImperialAramaic BlockPalmyrene BlockNabataean BlockHatran BlockPhoenician BlockLydian BlockMeroiticHieroglyphs BlockMeroiticCursive BlockKharoshthi BlockOldSouthArabian BlockOldNorthArabian BlockManichaean BlockAvestan BlockInscriptionalParthian BlockInscriptionalPahlavi BlockPsalterPahlavi BlockOldTurkic BlockOldHungarian BlockHanifiRohingya BlockGaray BlockRumiNumeralSymbols BlockYezidi BlockArabicExtendedC BlockOldSogdian BlockSogdian BlockOldUyghur BlockChorasmian BlockElymaic BlockBrahmi BlockKaithi BlockSoraSompeng BlockChakma BlockMahajani BlockSharada BlockSinhalaArchaicNumbers BlockKhojki BlockMultani BlockKhudawadi BlockGrantha BlockTuluTigalari BlockNewa BlockTirhuta BlockSiddham BlockModi BlockMongolianSupplement BlockTakri BlockMyanmarExtendedC BlockAhom BlockDogra BlockWarangCiti BlockDivesAkuru BlockNandinagari BlockZanabazarSquare BlockSoyombo BlockUnifiedCanadianAboriginalSyllabicsExtendedA BlockPauCinHau BlockDevanagariExtendedA BlockSunuwar BlockBhaiksuki BlockMarchen BlockMasaramGondi BlockGunjalaGondi BlockMakasar BlockKawi BlockLisuSupplement BlockTamilSupplement BlockCuneiform BlockCuneiformNumbersandPunctuation BlockEarlyDynasticCuneiform BlockCyproMinoan BlockEgyptianHieroglyphs BlockEgyptianHieroglyphFormatControls BlockEgyptianHieroglyphsExtendedA BlockAnatolianHieroglyphs BlockGurungKhema BlockBamumSupplement BlockMro BlockTangsa BlockBassaVah BlockPahawhHmong BlockKiratRai BlockMedefaidrin BlockMiao BlockIdeographicSymbolsandPunctuation BlockTangut BlockTangutComponents BlockKhitanSmallScript BlockTangutSupplement BlockKanaExtendedB BlockKanaSupplement BlockKanaExtendedA BlockSmallKanaExtension BlockNushu BlockDuployan BlockShorthandFormatControls BlockSymbolsforLegacyComputingSupplement BlockZnamennyMusicalNotation BlockByzantineMusicalSymbols BlockMusicalSymbols BlockAncientGreekMusicalNotation BlockKaktovikNumerals BlockMayanNumerals BlockTaiXuanJingSymbols BlockCountingRodNumerals BlockMathematicalAlphanumericSymbols BlockSuttonSignWriting BlockLatinExtendedG BlockGlagoliticSupplement BlockCyrillicExtendedD BlockNyiakengPuachueHmong BlockToto BlockWancho BlockNagMundari BlockOlOnal BlockEthiopicExtendedB BlockMendeKikakui BlockAdlam BlockIndicSiyaqNumbers BlockOttomanSiyaqNumbers BlockArabicMathematicalAlphabeticSymbols BlockMahjongTiles BlockDominoTiles BlockPlayingCards BlockEnclosedAlphanumericSupplement BlockEnclosedIdeographicSupplement BlockMiscellaneousSymbolsandPictographs BlockEmoticons BlockOrnamentalDingbats BlockTransportandMapSymbols BlockAlchemicalSymbols BlockGeometricShapesExtended BlockSupplementalArrowsC BlockSupplementalSymbolsandPictographs BlockChessSymbols BlockSymbolsandPictographsExtendedA BlockSymbolsforLegacyComputing BlockCJKUnifiedIdeographsExtensionB BlockCJKUnifiedIdeographsExtensionC BlockCJKUnifiedIdeographsExtensionD BlockCJKUnifiedIdeographsExtensionE BlockCJKUnifiedIdeographsExtensionF BlockCJKUnifiedIdeographsExtensionI BlockCJKCompatibilityIdeographsSupplement BlockCJKUnifiedIdeographsExtensionG BlockCJKUnifiedIdeographsExtensionH BlockTags BlockVariationSelectorsSupplement BlockSupplementaryPrivateUseAreaA BlockSupplementaryPrivateUseAreaB )
Unicode blocks
const ( CatUnknown = Category(iota) CatOther // C (Cc | Cf | Cn | Co | Cs) CatControl // Cc CatFormat // Cf CatUnassigned // Cn CatPrivateUse // Co CatSurrogate // Cs CatLetter // L (Ll | Lm | Lo | Lt | Lu) CatCasedLetter // LC (Ll | Lt | Lu) CatLowercaseLetter // Ll CatModifierLetter // Lm CatOtherLetter // Lo CatTitlecaseLetter // Lt CatUppercaseLetter // Lu CatMark // M (Mc | Me | Mn) CatSpacingMark // Mc CatEnclosingMark // Me CatNonspacingMark // Mn CatNumber // N (Nd | Nl | No) CatDecimalNumber // Nd CatLetterNumber // Nl CatOtherNumber // No CatPunctuation // P (Pc | Pd | Pe | Pf | Pi | Po | Ps) CatConnectorPunctuation // Pc CatDashPunctuation // Pd CatClosePunctuation // Pe CatFinalPunctuation // Pf CatInitialPunctuation // Pi CatOtherPunctuation // Po CatOpenPunctuation // Ps CatSymbol // S (Sc | Sk | Sm | So) CatCurrencySymbol // Sc CatModifierSymbol // Sk CatMathSymbol // Sm CatOtherSymbol // So CatSeparator // Z (Zl | Zp | Zs) CatLineSeparator // Zl CatParagraphSeparator // Zp CatSpaceSeparator // Zs )
Unicode general categories (long names).
const ( CatC = CatOther CatCc = CatControl CatCf = CatFormat CatCn = CatUnassigned CatCo = CatPrivateUse CatCs = CatSurrogate CatL = CatLetter CatLC = CatCasedLetter CatLl = CatLowercaseLetter CatLm = CatModifierLetter CatLo = CatOtherLetter CatLt = CatTitlecaseLetter CatLu = CatUppercaseLetter CatM = CatMark CatMc = CatSpacingMark CatMe = CatEnclosingMark CatMn = CatNonspacingMark CatN = CatNumber CatNd = CatDecimalNumber CatNl = CatLetterNumber CatNo = CatOtherNumber CatP = CatPunctuation CatPc = CatConnectorPunctuation CatPd = CatDashPunctuation CatPe = CatClosePunctuation CatPf = CatFinalPunctuation CatPi = CatInitialPunctuation CatPo = CatOtherPunctuation CatPs = CatOpenPunctuation CatS = CatSymbol CatSc = CatCurrencySymbol CatSk = CatModifierSymbol CatSm = CatMathSymbol CatSo = CatOtherSymbol CatZ = CatSeparator CatZl = CatLineSeparator CatZp = CatParagraphSeparator CatZs = CatSpaceSeparator )
Unicode general categories (short names).
const ( EmojiSmileysAndEmotion = EmojiGroup(iota) EmojiPeopleAndBody EmojiComponent EmojiAnimalsAndNature EmojiFoodAndDrink EmojiTravelAndPlaces EmojiActivities EmojiObjects EmojiSymbols EmojiFlags )
Emoji groups.
const ( EmojiFaceSmiling = EmojiSubgroup(iota) EmojiFaceAffection EmojiFaceTongue EmojiFaceHand EmojiFaceNeutralSkeptical EmojiFaceSleepy EmojiFaceUnwell EmojiFaceHat EmojiFaceGlasses EmojiFaceConcerned EmojiFaceNegative EmojiFaceCostume EmojiCatFace EmojiMonkeyFace EmojiHeart EmojiEmotion EmojiHandFingersOpen EmojiHandFingersPartial EmojiHandSingleFinger EmojiHandFingersClosed EmojiHands EmojiHandProp EmojiBodyParts EmojiPerson EmojiPersonGesture EmojiPersonRole EmojiPersonFantasy EmojiPersonActivity EmojiPersonSport EmojiPersonResting EmojiFamily EmojiPersonSymbol EmojiSkinTone EmojiHairStyle EmojiAnimalMammal EmojiAnimalBird EmojiAnimalAmphibian EmojiAnimalReptile EmojiAnimalMarine EmojiAnimalBug EmojiPlantFlower EmojiPlantOther EmojiFoodFruit EmojiFoodVegetable EmojiFoodPrepared EmojiFoodAsian EmojiFoodSweet EmojiDrink EmojiDishware EmojiPlaceMap EmojiPlaceGeographic EmojiPlaceBuilding EmojiPlaceReligious EmojiPlaceOther EmojiTransportGround EmojiTransportWater EmojiTransportAir EmojiHotel EmojiTime EmojiSkyAndweather EmojiEvent EmojiAwardMedal EmojiSport EmojiGame EmojiArtsAndcrafts EmojiClothing EmojiSound EmojiMusic EmojiMusicalInstrument EmojiPhone EmojiComputer EmojiLightAndvideo EmojiBookPaper EmojiMoney EmojiMail EmojiWriting EmojiOffice EmojiLock EmojiTool EmojiScience EmojiMedical EmojiHousehold EmojiOtherObject EmojiTransportSign EmojiWarning EmojiArrow EmojiReligion EmojiZodiac EmojiAvSymbol EmojiGender EmojiMath EmojiPunctuation EmojiCurrency EmojiOtherSymbol EmojiKeycap EmojiAlphanum EmojiGeometric EmojiFlag EmojiCountryFlag EmojiSubdivisionFlag )
Emoji subgroups.
const ( PropUnknown = Property(iota) PropASCIIHexDigit PropBidiControl PropDash PropDeprecated PropDiacritic PropExtender PropHexDigit PropHyphen PropIDSBinaryOperator PropIDSTrinaryOperator PropIDSUnaryOperator PropIDCompatMathContinue PropIDCompatMathStart PropIdeographic PropJoinControl PropLogicalOrderException PropModifierCombiningMark PropNoncharacterCodePoint PropOtherAlphabetic PropOtherDefaultIgnorableCodePoint PropOtherGraphemeExtend PropOtherIDContinue PropOtherIDStart PropOtherLowercase PropOtherMath PropOtherUppercase PropPatternSyntax PropPatternWhiteSpace PropPrependedConcatenationMark PropQuotationMark PropRadical PropRegionalIndicator PropSentenceTerminal PropSoftDotted PropTerminalPunctuation PropUnifiedIdeograph PropVariationSelector PropWhiteSpace )
Unicode properties
const ( ScriptUnknown = Script(iota) ScriptAdlam ScriptAhom ScriptAnatolianHieroglyphs ScriptArabic ScriptArmenian ScriptAvestan ScriptBalinese ScriptBamum ScriptBassaVah ScriptBatak ScriptBengali ScriptBhaiksuki ScriptBopomofo ScriptBrahmi ScriptBraille ScriptBuginese ScriptBuhid ScriptCanadianAboriginal ScriptCarian ScriptCaucasianAlbanian ScriptChakma ScriptCham ScriptCherokee ScriptChorasmian ScriptCommon ScriptCoptic ScriptCuneiform ScriptCypriot ScriptCyproMinoan ScriptCyrillic ScriptDeseret ScriptDevanagari ScriptDivesAkuru ScriptDogra ScriptDuployan ScriptEgyptianHieroglyphs ScriptElbasan ScriptElymaic ScriptEthiopic ScriptGaray ScriptGeorgian ScriptGlagolitic ScriptGothic ScriptGrantha ScriptGreek ScriptGujarati ScriptGunjalaGondi ScriptGurmukhi ScriptGurungKhema ScriptHan ScriptHangul ScriptHanifiRohingya ScriptHanunoo ScriptHatran ScriptHebrew ScriptHiragana ScriptImperialAramaic ScriptInherited ScriptInscriptionalPahlavi ScriptInscriptionalParthian ScriptJavanese ScriptKaithi ScriptKannada ScriptKatakana ScriptKawi ScriptKayahLi ScriptKharoshthi ScriptKhitanSmallScript ScriptKhmer ScriptKhojki ScriptKhudawadi ScriptKiratRai ScriptLao ScriptLatin ScriptLepcha ScriptLimbu ScriptLinearA ScriptLinearB ScriptLisu ScriptLycian ScriptLydian ScriptMahajani ScriptMakasar ScriptMalayalam ScriptMandaic ScriptManichaean ScriptMarchen ScriptMasaramGondi ScriptMedefaidrin ScriptMeeteiMayek ScriptMendeKikakui ScriptMeroiticCursive ScriptMeroiticHieroglyphs ScriptMiao ScriptModi ScriptMongolian ScriptMro ScriptMultani ScriptMyanmar ScriptNabataean ScriptNagMundari ScriptNandinagari ScriptNewTaiLue ScriptNewa ScriptNko ScriptNushu ScriptNyiakengPuachueHmong ScriptOgham ScriptOlChiki ScriptOlOnal ScriptOldHungarian ScriptOldItalic ScriptOldNorthArabian ScriptOldPermic ScriptOldPersian ScriptOldSogdian ScriptOldSouthArabian ScriptOldTurkic ScriptOldUyghur ScriptOriya ScriptOsage ScriptOsmanya ScriptPahawhHmong ScriptPalmyrene ScriptPauCinHau ScriptPhagsPa ScriptPhoenician ScriptPsalterPahlavi ScriptRejang ScriptRunic ScriptSamaritan ScriptSaurashtra ScriptSharada ScriptShavian ScriptSiddham ScriptSignWriting ScriptSinhala ScriptSogdian ScriptSoraSompeng ScriptSoyombo ScriptSundanese ScriptSunuwar ScriptSylotiNagri ScriptSyriac ScriptTagalog ScriptTagbanwa ScriptTaiLe ScriptTaiTham ScriptTaiViet ScriptTakri ScriptTamil ScriptTangsa ScriptTangut ScriptTelugu ScriptThaana ScriptThai ScriptTibetan ScriptTifinagh ScriptTirhuta ScriptTodhri ScriptToto ScriptTuluTigalari ScriptUgaritic ScriptVai ScriptVithkuqi ScriptWancho ScriptWarangCiti ScriptYezidi ScriptYi ScriptZanabazarSquare )
Unicode scripts
const ( PlaneUnknown = Plane(iota) PlaneBMP // 0: Basic Multilingual Plane PlaneSMP // 1: Supplementary Multilingual Plane PlaneSIP // 2: Supplementary Ideographic Plane PlaneTIP // 3: Tertiary Ideographic Plane PlaneUnassigned // 4-13: Unassigned PlaneSpecial // 14: Supplementary Special-purpose Plane PlanePrivate // 15-16: Supplementary Private Use Area planes )
Unicode planes.
const ( WidthAmbiguous = Width(iota) // Ambiguous, A WidthFullWidth // FullWidth, F WidthHalfWidth // Halfwidth, H WidthNarrow // Narrow, N WidthNeutral // Neutral (Not East Asian), Na WidthWide // Wide, W )
Unicode widths.
const ( UnicodeLatest = Unicode(iota) Unicode1_1 Unicode2 Unicode2_1 Unicode3 Unicode3_1 Unicode3_2 Unicode4 Unicode4_1 Unicode5 Unicode5_1 Unicode5_2 Unicode6 Unicode6_1 Unicode6_2 Unicode6_3 Unicode7 Unicode8 Unicode9 Unicode10 Unicode11 Unicode12 Unicode12_1 Unicode13 Unicode14 Unicode15 Unicode15_1 Unicode16 )
Unicode versions.
Variables ¶
Blocks is a list of all Unicode blocks.
var Categories = map[Category]struct { ShortName, Name string Include []Category }{ CatOther: {"C", "Other", []Category{CatCc, CatCf, CatCn, CatCo, CatCs}}, CatControl: {"Cc", "Control", nil}, CatFormat: {"Cf", "Format", nil}, CatUnassigned: {"Cn", "Unassigned", nil}, CatPrivateUse: {"Co", "Private_Use", nil}, CatSurrogate: {"Cs", "Surrogate", nil}, CatLetter: {"L", "Letter", []Category{CatLl, CatLm, CatLo, CatLt, CatLu}}, CatCasedLetter: {"LC", "Cased_Letter", []Category{CatLl, CatLt, CatLu}}, CatLowercaseLetter: {"Ll", "Lowercase_Letter", nil}, CatModifierLetter: {"Lm", "Modifier_Letter", nil}, CatOtherLetter: {"Lo", "Other_Letter", nil}, CatTitlecaseLetter: {"Lt", "Titlecase_Letter", nil}, CatUppercaseLetter: {"Lu", "Uppercase_Letter", nil}, CatMark: {"M", "Mark", []Category{CatMc, CatMe, CatMn}}, CatSpacingMark: {"Mc", "Spacing_Mark", nil}, CatEnclosingMark: {"Me", "Enclosing_Mark", nil}, CatNonspacingMark: {"Mn", "Nonspacing_Mark", nil}, CatNumber: {"N", "Number", []Category{CatNd, CatNl, CatNo}}, CatDecimalNumber: {"Nd", "Decimal_Number", nil}, CatLetterNumber: {"Nl", "Letter_Number", nil}, CatOtherNumber: {"No", "Other_Number", nil}, CatPunctuation: {"P", "Punctuation", []Category{CatPc, CatPd, CatPe, CatPf, CatPi, CatPo, CatPs}}, CatConnectorPunctuation: {"Pc", "Connector_Punctuation", nil}, CatDashPunctuation: {"Pd", "Dash_Punctuation", nil}, CatClosePunctuation: {"Pe", "Close_Punctuation", nil}, CatFinalPunctuation: {"Pf", "Final_Punctuation", nil}, CatInitialPunctuation: {"Pi", "Initial_Punctuation", nil}, CatOtherPunctuation: {"Po", "Other_Punctuation", nil}, CatOpenPunctuation: {"Ps", "Open_Punctuation", nil}, CatSymbol: {"S", "Symbol", []Category{CatSc, CatSk, CatSm, CatSo}}, CatCurrencySymbol: {"Sc", "Currency_Symbol", nil}, CatModifierSymbol: {"Sk", "Modifier_Symbol", nil}, CatMathSymbol: {"Sm", "Math_Symbol", nil}, CatOtherSymbol: {"So", "Other_Symbol", nil}, CatSeparator: {"Z", "Separator", []Category{CatZl, CatZp, CatZs}}, CatLineSeparator: {"Zl", "Line_Separator", nil}, CatParagraphSeparator: {"Zp", "Paragraph_Separator", nil}, CatSpaceSeparator: {"Zs", "Space_Separator", nil}, }
Categories is a list of all categories.
var EmojiGroups = map[EmojiGroup]struct { Name string Subgroups []EmojiSubgroup }{ EmojiSmileysAndEmotion: {"Smileys & Emotion", []EmojiSubgroup{ EmojiFaceSmiling, EmojiFaceAffection, EmojiFaceTongue, EmojiFaceHand, EmojiFaceNeutralSkeptical, EmojiFaceSleepy, EmojiFaceUnwell, EmojiFaceHat, EmojiFaceGlasses, EmojiFaceConcerned, EmojiFaceNegative, EmojiFaceCostume, EmojiCatFace, EmojiMonkeyFace, EmojiHeart, EmojiEmotion}}, EmojiPeopleAndBody: {"People & Body", []EmojiSubgroup{ EmojiHandFingersOpen, EmojiHandFingersPartial, EmojiHandSingleFinger, EmojiHandFingersClosed, EmojiHands, EmojiHandProp, EmojiBodyParts, EmojiPerson, EmojiPersonGesture, EmojiPersonRole, EmojiPersonFantasy, EmojiPersonActivity, EmojiPersonSport, EmojiPersonResting, EmojiFamily, EmojiPersonSymbol}}, EmojiComponent: {"Component", []EmojiSubgroup{ EmojiSkinTone, EmojiHairStyle}}, EmojiAnimalsAndNature: {"Animals & Nature", []EmojiSubgroup{ EmojiAnimalMammal, EmojiAnimalBird, EmojiAnimalAmphibian, EmojiAnimalReptile, EmojiAnimalMarine, EmojiAnimalBug, EmojiPlantFlower, EmojiPlantOther}}, EmojiFoodAndDrink: {"Food & Drink", []EmojiSubgroup{ EmojiFoodFruit, EmojiFoodVegetable, EmojiFoodPrepared, EmojiFoodAsian, EmojiFoodSweet, EmojiDrink, EmojiDishware}}, EmojiTravelAndPlaces: {"Travel & Places", []EmojiSubgroup{ EmojiPlaceMap, EmojiPlaceGeographic, EmojiPlaceBuilding, EmojiPlaceReligious, EmojiPlaceOther, EmojiTransportGround, EmojiTransportWater, EmojiTransportAir, EmojiHotel, EmojiTime, EmojiSkyAndweather}}, EmojiActivities: {"Activities", []EmojiSubgroup{ EmojiEvent, EmojiAwardMedal, EmojiSport, EmojiGame, EmojiArtsAndcrafts}}, EmojiObjects: {"Objects", []EmojiSubgroup{ EmojiClothing, EmojiSound, EmojiMusic, EmojiMusicalInstrument, EmojiPhone, EmojiComputer, EmojiLightAndvideo, EmojiBookPaper, EmojiMoney, EmojiMail, EmojiWriting, EmojiOffice, EmojiLock, EmojiTool, EmojiScience, EmojiMedical, EmojiHousehold, EmojiOtherObject}}, EmojiSymbols: {"Symbols", []EmojiSubgroup{ EmojiTransportSign, EmojiWarning, EmojiArrow, EmojiReligion, EmojiZodiac, EmojiAvSymbol, EmojiGender, EmojiMath, EmojiPunctuation, EmojiCurrency, EmojiOtherSymbol, EmojiKeycap, EmojiAlphanum, EmojiGeometric}}, EmojiFlags: {"Flags", []EmojiSubgroup{ EmojiFlag, EmojiCountryFlag, EmojiSubdivisionFlag}}, }
EmojiGroups is a list of all emoji groups.
var EmojiSubgroups = map[EmojiSubgroup]struct { Group EmojiGroup Name string }{ EmojiFaceSmiling: {EmojiSmileysAndEmotion, "face-smiling"}, EmojiFaceAffection: {EmojiSmileysAndEmotion, "face-affection"}, EmojiFaceTongue: {EmojiSmileysAndEmotion, "face-tongue"}, EmojiFaceHand: {EmojiSmileysAndEmotion, "face-hand"}, EmojiFaceNeutralSkeptical: {EmojiSmileysAndEmotion, "face-neutral-skeptical"}, EmojiFaceSleepy: {EmojiSmileysAndEmotion, "face-sleepy"}, EmojiFaceUnwell: {EmojiSmileysAndEmotion, "face-unwell"}, EmojiFaceHat: {EmojiSmileysAndEmotion, "face-hat"}, EmojiFaceGlasses: {EmojiSmileysAndEmotion, "face-glasses"}, EmojiFaceConcerned: {EmojiSmileysAndEmotion, "face-concerned"}, EmojiFaceNegative: {EmojiSmileysAndEmotion, "face-negative"}, EmojiFaceCostume: {EmojiSmileysAndEmotion, "face-costume"}, EmojiCatFace: {EmojiSmileysAndEmotion, "cat-face"}, EmojiMonkeyFace: {EmojiSmileysAndEmotion, "monkey-face"}, EmojiHeart: {EmojiSmileysAndEmotion, "heart"}, EmojiEmotion: {EmojiSmileysAndEmotion, "emotion"}, EmojiHandFingersOpen: {EmojiPeopleAndBody, "hand-fingers-open"}, EmojiHandFingersPartial: {EmojiPeopleAndBody, "hand-fingers-partial"}, EmojiHandSingleFinger: {EmojiPeopleAndBody, "hand-single-finger"}, EmojiHandFingersClosed: {EmojiPeopleAndBody, "hand-fingers-closed"}, EmojiHands: {EmojiPeopleAndBody, "hands"}, EmojiHandProp: {EmojiPeopleAndBody, "hand-prop"}, EmojiBodyParts: {EmojiPeopleAndBody, "body-parts"}, EmojiPerson: {EmojiPeopleAndBody, "person"}, EmojiPersonGesture: {EmojiPeopleAndBody, "person-gesture"}, EmojiPersonRole: {EmojiPeopleAndBody, "person-role"}, EmojiPersonFantasy: {EmojiPeopleAndBody, "person-fantasy"}, EmojiPersonActivity: {EmojiPeopleAndBody, "person-activity"}, EmojiPersonSport: {EmojiPeopleAndBody, "person-sport"}, EmojiPersonResting: {EmojiPeopleAndBody, "person-resting"}, EmojiFamily: {EmojiPeopleAndBody, "family"}, EmojiPersonSymbol: {EmojiPeopleAndBody, "person-symbol"}, EmojiSkinTone: {EmojiComponent, "skin-tone"}, EmojiHairStyle: {EmojiComponent, "hair-style"}, EmojiAnimalMammal: {EmojiAnimalsAndNature, "animal-mammal"}, EmojiAnimalBird: {EmojiAnimalsAndNature, "animal-bird"}, EmojiAnimalAmphibian: {EmojiAnimalsAndNature, "animal-amphibian"}, EmojiAnimalReptile: {EmojiAnimalsAndNature, "animal-reptile"}, EmojiAnimalMarine: {EmojiAnimalsAndNature, "animal-marine"}, EmojiAnimalBug: {EmojiAnimalsAndNature, "animal-bug"}, EmojiPlantFlower: {EmojiAnimalsAndNature, "plant-flower"}, EmojiPlantOther: {EmojiAnimalsAndNature, "plant-other"}, EmojiFoodFruit: {EmojiFoodAndDrink, "food-fruit"}, EmojiFoodVegetable: {EmojiFoodAndDrink, "food-vegetable"}, EmojiFoodPrepared: {EmojiFoodAndDrink, "food-prepared"}, EmojiFoodAsian: {EmojiFoodAndDrink, "food-asian"}, EmojiFoodSweet: {EmojiFoodAndDrink, "food-sweet"}, EmojiDrink: {EmojiFoodAndDrink, "drink"}, EmojiDishware: {EmojiFoodAndDrink, "dishware"}, EmojiPlaceMap: {EmojiTravelAndPlaces, "place-map"}, EmojiPlaceGeographic: {EmojiTravelAndPlaces, "place-geographic"}, EmojiPlaceBuilding: {EmojiTravelAndPlaces, "place-building"}, EmojiPlaceReligious: {EmojiTravelAndPlaces, "place-religious"}, EmojiPlaceOther: {EmojiTravelAndPlaces, "place-other"}, EmojiTransportGround: {EmojiTravelAndPlaces, "transport-ground"}, EmojiTransportWater: {EmojiTravelAndPlaces, "transport-water"}, EmojiTransportAir: {EmojiTravelAndPlaces, "transport-air"}, EmojiHotel: {EmojiTravelAndPlaces, "hotel"}, EmojiTime: {EmojiTravelAndPlaces, "time"}, EmojiSkyAndweather: {EmojiTravelAndPlaces, "sky & weather"}, EmojiEvent: {EmojiActivities, "event"}, EmojiAwardMedal: {EmojiActivities, "award-medal"}, EmojiSport: {EmojiActivities, "sport"}, EmojiGame: {EmojiActivities, "game"}, EmojiArtsAndcrafts: {EmojiActivities, "arts & crafts"}, EmojiClothing: {EmojiObjects, "clothing"}, EmojiSound: {EmojiObjects, "sound"}, EmojiMusic: {EmojiObjects, "music"}, EmojiMusicalInstrument: {EmojiObjects, "musical-instrument"}, EmojiPhone: {EmojiObjects, "phone"}, EmojiComputer: {EmojiObjects, "computer"}, EmojiLightAndvideo: {EmojiObjects, "light & video"}, EmojiBookPaper: {EmojiObjects, "book-paper"}, EmojiMoney: {EmojiObjects, "money"}, EmojiMail: {EmojiObjects, "mail"}, EmojiWriting: {EmojiObjects, "writing"}, EmojiOffice: {EmojiObjects, "office"}, EmojiLock: {EmojiObjects, "lock"}, EmojiTool: {EmojiObjects, "tool"}, EmojiScience: {EmojiObjects, "science"}, EmojiMedical: {EmojiObjects, "medical"}, EmojiHousehold: {EmojiObjects, "household"}, EmojiOtherObject: {EmojiObjects, "other-object"}, EmojiTransportSign: {EmojiSymbols, "transport-sign"}, EmojiWarning: {EmojiSymbols, "warning"}, EmojiArrow: {EmojiSymbols, "arrow"}, EmojiReligion: {EmojiSymbols, "religion"}, EmojiZodiac: {EmojiSymbols, "zodiac"}, EmojiAvSymbol: {EmojiSymbols, "av-symbol"}, EmojiGender: {EmojiSymbols, "gender"}, EmojiMath: {EmojiSymbols, "math"}, EmojiPunctuation: {EmojiSymbols, "punctuation"}, EmojiCurrency: {EmojiSymbols, "currency"}, EmojiOtherSymbol: {EmojiSymbols, "other-symbol"}, EmojiKeycap: {EmojiSymbols, "keycap"}, EmojiAlphanum: {EmojiSymbols, "alphanum"}, EmojiGeometric: {EmojiSymbols, "geometric"}, EmojiFlag: {EmojiFlags, "flag"}, EmojiCountryFlag: {EmojiFlags, "country-flag"}, EmojiSubdivisionFlag: {EmojiFlags, "subdivision-flag"}, }
EmojiSubgroups is a list of all emoji subgroups.
var Emojis = []Emoji{ /* 1709 elements not displayed */ }
var Planes = map[Plane]struct { Range [2]rune Name string }{ PlaneBMP: {[2]rune{0x00000, 0x00FFFF}, "Basic Multilingual Plane"}, PlaneSMP: {[2]rune{0x10000, 0x01FFFF}, "Supplementary Multilingual Plane"}, PlaneSIP: {[2]rune{0x20000, 0x02FFFF}, "Supplementary Ideographic Plane"}, PlaneTIP: {[2]rune{0x30000, 0x03FFFF}, "Tertiary Ideographic Plane"}, PlaneUnassigned: {[2]rune{0x40000, 0x0DFFFF}, "Unassigned"}, PlaneSpecial: {[2]rune{0xE0000, 0x0EFFFF}, "Supplementary Special-purpose Plane"}, PlanePrivate: {[2]rune{0xF0000, 0x10FFFF}, "Supplementary Private Use Area planes"}, }
Planes is a list of all Unicode planes.
var Properties = map[Property]struct { Name string Ranges [][2]rune }{ PropASCIIHexDigit: {"ASCII Hex Digit", [][2]rune{ {0x0061, 0x0066}, {0x0041, 0x0046}, {0x0030, 0x0039}, }}, PropBidiControl: {"Bidi Control", [][2]rune{ {0x2066, 0x2069}, {0x202A, 0x202E}, {0x200E, 0x200F}, {0x061C, 0x061C}, }}, PropDash: {"Dash", [][2]rune{ {0x10EAD, 0x10EAD}, {0x10D6E, 0x10D6E}, {0xFF0D, 0xFF0D}, {0xFE63, 0xFE63}, {0xFE58, 0xFE58}, {0xFE31, 0xFE32}, {0x30A0, 0x30A0}, {0x3030, 0x3030}, {0x301C, 0x301C}, {0x2E5D, 0x2E5D}, {0x2E40, 0x2E40}, {0x2E3A, 0x2E3B}, {0x2E1A, 0x2E1A}, {0x2E17, 0x2E17}, {0x2212, 0x2212}, {0x208B, 0x208B}, {0x207B, 0x207B}, {0x2053, 0x2053}, {0x2010, 0x2015}, {0x1806, 0x1806}, {0x1400, 0x1400}, {0x05BE, 0x05BE}, {0x058A, 0x058A}, {0x002D, 0x002D}, }}, PropDeprecated: {"Deprecated", [][2]rune{ {0xE0001, 0xE0001}, {0x232A, 0x232A}, {0x2329, 0x2329}, {0x206A, 0x206F}, {0x17A3, 0x17A4}, {0x0F79, 0x0F79}, {0x0F77, 0x0F77}, {0x0673, 0x0673}, {0x0149, 0x0149}, }}, PropDiacritic: {"Diacritic", [][2]rune{ /* 260 elements not displayed */ }}, PropExtender: {"Extender", [][2]rune{ {0x1E944, 0x1E946}, {0x1E5EF, 0x1E5EF}, {0x1E13C, 0x1E13D}, {0x16FE3, 0x16FE3}, {0x16FE0, 0x16FE1}, {0x16B42, 0x16B43}, {0x11A98, 0x11A98}, {0x115C6, 0x115C8}, {0x113D3, 0x113D3}, {0x113D2, 0x113D2}, {0x1135D, 0x1135D}, {0x11237, 0x11237}, {0x10D6F, 0x10D6F}, {0x10D6A, 0x10D6A}, {0x10D4E, 0x10D4E}, {0x10781, 0x10782}, {0xFF70, 0xFF70}, {0xAAF3, 0xAAF4}, {0xAADD, 0xAADD}, {0xAA70, 0xAA70}, {0xA9E6, 0xA9E6}, {0xA9CF, 0xA9CF}, {0xA60C, 0xA60C}, {0xA015, 0xA015}, {0x30FC, 0x30FE}, {0x309D, 0x309E}, {0x3031, 0x3035}, {0x3005, 0x3005}, {0x1C7B, 0x1C7B}, {0x1C36, 0x1C36}, {0x1AA7, 0x1AA7}, {0x1843, 0x1843}, {0x180A, 0x180A}, {0x0EC6, 0x0EC6}, {0x0E46, 0x0E46}, {0x0B55, 0x0B55}, {0x0AFB, 0x0AFB}, {0x0A71, 0x0A71}, {0x07FA, 0x07FA}, {0x0640, 0x0640}, {0x02D0, 0x02D1}, {0x00B7, 0x00B7}, }}, PropHexDigit: {"Hex Digit", [][2]rune{ {0xFF41, 0xFF46}, {0xFF21, 0xFF26}, {0xFF10, 0xFF19}, {0x0061, 0x0066}, {0x0041, 0x0046}, {0x0030, 0x0039}, }}, PropHyphen: {"Hyphen", [][2]rune{ {0xFF65, 0xFF65}, {0xFF0D, 0xFF0D}, {0xFE63, 0xFE63}, {0x30FB, 0x30FB}, {0x2E17, 0x2E17}, {0x2010, 0x2011}, {0x1806, 0x1806}, {0x058A, 0x058A}, {0x00AD, 0x00AD}, {0x002D, 0x002D}, }}, PropIDSBinaryOperator: {"IDS Binary Operator", [][2]rune{ {0x31EF, 0x31EF}, {0x2FF4, 0x2FFD}, {0x2FF0, 0x2FF1}, }}, PropIDSTrinaryOperator: {"IDS Trinary Operator", [][2]rune{ {0x2FF2, 0x2FF3}, }}, PropIDSUnaryOperator: {"IDS Unary Operator", [][2]rune{ {0x2FFE, 0x2FFF}, }}, PropIDCompatMathContinue: {"ID Compat Math Continue", [][2]rune{ {0x1D7C3, 0x1D7C3}, {0x1D7A9, 0x1D7A9}, {0x1D789, 0x1D789}, {0x1D76F, 0x1D76F}, {0x1D74F, 0x1D74F}, {0x1D735, 0x1D735}, {0x1D715, 0x1D715}, {0x1D6FB, 0x1D6FB}, {0x1D6DB, 0x1D6DB}, {0x1D6C1, 0x1D6C1}, {0x221E, 0x221E}, {0x2207, 0x2207}, {0x2202, 0x2202}, {0x208E, 0x208E}, {0x208D, 0x208D}, {0x208A, 0x208C}, {0x2080, 0x2089}, {0x207E, 0x207E}, {0x207D, 0x207D}, {0x207A, 0x207C}, {0x2074, 0x2079}, {0x2070, 0x2070}, {0x00B9, 0x00B9}, {0x00B2, 0x00B3}, }}, PropIDCompatMathStart: {"ID Compat Math Start", [][2]rune{ {0x1D7C3, 0x1D7C3}, {0x1D7A9, 0x1D7A9}, {0x1D789, 0x1D789}, {0x1D76F, 0x1D76F}, {0x1D74F, 0x1D74F}, {0x1D735, 0x1D735}, {0x1D715, 0x1D715}, {0x1D6FB, 0x1D6FB}, {0x1D6DB, 0x1D6DB}, {0x1D6C1, 0x1D6C1}, {0x221E, 0x221E}, {0x2207, 0x2207}, {0x2202, 0x2202}, }}, PropIdeographic: {"Ideographic", [][2]rune{ {0x31350, 0x323AF}, {0x30000, 0x3134A}, {0x2F800, 0x2FA1D}, {0x2EBF0, 0x2EE5D}, {0x2CEB0, 0x2EBE0}, {0x2B820, 0x2CEA1}, {0x2B740, 0x2B81D}, {0x2A700, 0x2B739}, {0x20000, 0x2A6DF}, {0x1B170, 0x1B2FB}, {0x18CFF, 0x18D08}, {0x18800, 0x18CD5}, {0x17000, 0x187F7}, {0x16FE4, 0x16FE4}, {0xFA70, 0xFAD9}, {0xF900, 0xFA6D}, {0x4E00, 0x9FFF}, {0x3400, 0x4DBF}, {0x3038, 0x303A}, {0x3021, 0x3029}, {0x3007, 0x3007}, {0x3006, 0x3006}, }}, PropJoinControl: {"Join Control", [][2]rune{ {0x200C, 0x200D}, }}, PropLogicalOrderException: {"Logical Order Exception", [][2]rune{ {0xAABB, 0xAABC}, {0xAAB9, 0xAAB9}, {0xAAB5, 0xAAB6}, {0x19BA, 0x19BA}, {0x19B5, 0x19B7}, {0x0EC0, 0x0EC4}, {0x0E40, 0x0E44}, }}, PropModifierCombiningMark: {"Modifier Combining Mark", [][2]rune{ {0x08F3, 0x08F3}, {0x08D3, 0x08D3}, {0x08CD, 0x08CF}, {0x08CA, 0x08CB}, {0x06E7, 0x06E8}, {0x06E3, 0x06E3}, {0x06DC, 0x06DC}, {0x0658, 0x0658}, {0x0654, 0x0655}, }}, PropNoncharacterCodePoint: {"Noncharacter Code Point", [][2]rune{ {0x10FFFE, 0x10FFFF}, {0xFFFFE, 0xFFFFF}, {0xEFFFE, 0xEFFFF}, {0xDFFFE, 0xDFFFF}, {0xCFFFE, 0xCFFFF}, {0xBFFFE, 0xBFFFF}, {0xAFFFE, 0xAFFFF}, {0x9FFFE, 0x9FFFF}, {0x8FFFE, 0x8FFFF}, {0x7FFFE, 0x7FFFF}, {0x6FFFE, 0x6FFFF}, {0x5FFFE, 0x5FFFF}, {0x4FFFE, 0x4FFFF}, {0x3FFFE, 0x3FFFF}, {0x2FFFE, 0x2FFFF}, {0x1FFFE, 0x1FFFF}, {0xFFFE, 0xFFFF}, {0xFDD0, 0xFDEF}, }}, PropOtherAlphabetic: {"Other Alphabetic", [][2]rune{ /* 419 elements not displayed */ }}, PropOtherDefaultIgnorableCodePoint: {"Other Default Ignorable Code Point", [][2]rune{ {0xE01F0, 0xE0FFF}, {0xE0080, 0xE00FF}, {0xE0002, 0xE001F}, {0xE0000, 0xE0000}, {0xFFF0, 0xFFF8}, {0xFFA0, 0xFFA0}, {0x3164, 0x3164}, {0x2065, 0x2065}, {0x17B4, 0x17B5}, {0x115F, 0x1160}, {0x034F, 0x034F}, }}, PropOtherGraphemeExtend: {"Other Grapheme Extend", [][2]rune{ {0xE0020, 0xE007F}, {0x1D16D, 0x1D172}, {0x1D165, 0x1D166}, {0x16FF0, 0x16FF1}, {0x11F41, 0x11F41}, {0x1193D, 0x1193D}, {0x11930, 0x11930}, {0x116B6, 0x116B6}, {0x115AF, 0x115AF}, {0x114BD, 0x114BD}, {0x114B0, 0x114B0}, {0x113CF, 0x113CF}, {0x113C7, 0x113C9}, {0x113C5, 0x113C5}, {0x113C2, 0x113C2}, {0x113B8, 0x113B8}, {0x11357, 0x11357}, {0x1134D, 0x1134D}, {0x1133E, 0x1133E}, {0x11235, 0x11235}, {0x111C0, 0x111C0}, {0xFF9E, 0xFF9F}, {0xA9C0, 0xA9C0}, {0xA953, 0xA953}, {0x302E, 0x302F}, {0x200C, 0x200C}, {0x1BF2, 0x1BF3}, {0x1BAA, 0x1BAA}, {0x1B43, 0x1B44}, {0x1B3D, 0x1B3D}, {0x1B3B, 0x1B3B}, {0x1B35, 0x1B35}, {0x1734, 0x1734}, {0x1715, 0x1715}, {0x0DDF, 0x0DDF}, {0x0DCF, 0x0DCF}, {0x0D57, 0x0D57}, {0x0D3E, 0x0D3E}, {0x0CD5, 0x0CD6}, {0x0CCA, 0x0CCB}, {0x0CC7, 0x0CC8}, {0x0CC2, 0x0CC2}, {0x0CC0, 0x0CC0}, {0x0BD7, 0x0BD7}, {0x0BBE, 0x0BBE}, {0x0B57, 0x0B57}, {0x0B3E, 0x0B3E}, {0x09D7, 0x09D7}, {0x09BE, 0x09BE}, }}, PropOtherIDContinue: {"Other ID Continue", [][2]rune{ {0xFF65, 0xFF65}, {0x30FB, 0x30FB}, {0x200C, 0x200D}, {0x19DA, 0x19DA}, {0x1369, 0x1371}, {0x0387, 0x0387}, {0x00B7, 0x00B7}, }}, PropOtherIDStart: {"Other ID Start", [][2]rune{ {0x309B, 0x309C}, {0x212E, 0x212E}, {0x2118, 0x2118}, {0x1885, 0x1886}, }}, PropOtherLowercase: {"Other Lowercase", [][2]rune{ {0x1E030, 0x1E06D}, {0x107B2, 0x107BA}, {0x10787, 0x107B0}, {0x10783, 0x10785}, {0x10780, 0x10780}, {0xAB69, 0xAB69}, {0xAB5C, 0xAB5F}, {0xA7F8, 0xA7F9}, {0xA7F2, 0xA7F4}, {0xA770, 0xA770}, {0xA69C, 0xA69D}, {0x2C7C, 0x2C7D}, {0x24D0, 0x24E9}, {0x2170, 0x217F}, {0x2090, 0x209C}, {0x207F, 0x207F}, {0x2071, 0x2071}, {0x1D9B, 0x1DBF}, {0x1D78, 0x1D78}, {0x1D2C, 0x1D6A}, {0x10FC, 0x10FC}, {0x037A, 0x037A}, {0x0345, 0x0345}, {0x02E0, 0x02E4}, {0x02C0, 0x02C1}, {0x02B0, 0x02B8}, {0x00BA, 0x00BA}, {0x00AA, 0x00AA}, }}, PropOtherMath: {"Other Math", [][2]rune{ /* 176 elements not displayed */ }}, PropOtherUppercase: {"Other Uppercase", [][2]rune{ {0x1F170, 0x1F189}, {0x1F150, 0x1F169}, {0x1F130, 0x1F149}, {0x24B6, 0x24CF}, {0x2160, 0x216F}, }}, PropPatternSyntax: {"Pattern Syntax", [][2]rune{ /* 257 elements not displayed */ }}, PropPatternWhiteSpace: {"Pattern White Space", [][2]rune{ {0x2029, 0x2029}, {0x2028, 0x2028}, {0x200E, 0x200F}, {0x0085, 0x0085}, {0x0020, 0x0020}, {0x0009, 0x000D}, }}, PropPrependedConcatenationMark: {"Prepended Concatenation Mark", [][2]rune{ {0x110CD, 0x110CD}, {0x110BD, 0x110BD}, {0x08E2, 0x08E2}, {0x0890, 0x0891}, {0x070F, 0x070F}, {0x06DD, 0x06DD}, {0x0600, 0x0605}, }}, PropQuotationMark: {"Quotation Mark", [][2]rune{ {0xFF63, 0xFF63}, {0xFF62, 0xFF62}, {0xFF07, 0xFF07}, {0xFF02, 0xFF02}, {0xFE44, 0xFE44}, {0xFE43, 0xFE43}, {0xFE42, 0xFE42}, {0xFE41, 0xFE41}, {0x301E, 0x301F}, {0x301D, 0x301D}, {0x300F, 0x300F}, {0x300E, 0x300E}, {0x300D, 0x300D}, {0x300C, 0x300C}, {0x2E42, 0x2E42}, {0x203A, 0x203A}, {0x2039, 0x2039}, {0x201F, 0x201F}, {0x201E, 0x201E}, {0x201D, 0x201D}, {0x201B, 0x201C}, {0x201A, 0x201A}, {0x2019, 0x2019}, {0x2018, 0x2018}, {0x00BB, 0x00BB}, {0x00AB, 0x00AB}, {0x0027, 0x0027}, {0x0022, 0x0022}, }}, PropRadical: {"Radical", [][2]rune{ {0x2F00, 0x2FD5}, {0x2E9B, 0x2EF3}, {0x2E80, 0x2E99}, }}, PropRegionalIndicator: {"Regional Indicator", [][2]rune{ {0x1F1E6, 0x1F1FF}, }}, PropSentenceTerminal: {"Sentence Terminal", [][2]rune{ {0x1DA88, 0x1DA88}, {0x1BC9F, 0x1BC9F}, {0x16E98, 0x16E98}, {0x16D6E, 0x16D6F}, {0x16B44, 0x16B44}, {0x16B37, 0x16B38}, {0x16AF5, 0x16AF5}, {0x16A6E, 0x16A6F}, {0x11F43, 0x11F44}, {0x11EF7, 0x11EF8}, {0x11C41, 0x11C42}, {0x11A9B, 0x11A9C}, {0x11A42, 0x11A43}, {0x11946, 0x11946}, {0x11944, 0x11944}, {0x1173C, 0x1173E}, {0x11641, 0x11642}, {0x115C9, 0x115D7}, {0x115C2, 0x115C3}, {0x1144B, 0x1144C}, {0x113D4, 0x113D5}, {0x112A9, 0x112A9}, {0x1123B, 0x1123C}, {0x11238, 0x11239}, {0x111DE, 0x111DF}, {0x111CD, 0x111CD}, {0x111C5, 0x111C6}, {0x11141, 0x11143}, {0x110BE, 0x110C1}, {0x11047, 0x11048}, {0x10F86, 0x10F89}, {0x10F55, 0x10F59}, {0x10A56, 0x10A57}, {0xFF61, 0xFF61}, {0xFF1F, 0xFF1F}, {0xFF0E, 0xFF0E}, {0xFF01, 0xFF01}, {0xFE56, 0xFE57}, {0xFE52, 0xFE52}, {0xFE15, 0xFE16}, {0xFE12, 0xFE12}, {0xABEB, 0xABEB}, {0xAAF0, 0xAAF1}, {0xAA5D, 0xAA5F}, {0xA9C8, 0xA9C9}, {0xA92F, 0xA92F}, {0xA8CE, 0xA8CF}, {0xA876, 0xA877}, {0xA6F7, 0xA6F7}, {0xA6F3, 0xA6F3}, {0xA60E, 0xA60F}, {0xA4FF, 0xA4FF}, {0x3002, 0x3002}, {0x2E53, 0x2E54}, {0x2E3C, 0x2E3C}, {0x2E2E, 0x2E2E}, {0x2CF9, 0x2CFB}, {0x2047, 0x2049}, {0x203C, 0x203D}, {0x2024, 0x2024}, {0x1C7E, 0x1C7F}, {0x1C3B, 0x1C3C}, {0x1B7D, 0x1B7F}, {0x1B5E, 0x1B5F}, {0x1B5A, 0x1B5B}, {0x1B4E, 0x1B4F}, {0x1AA8, 0x1AAB}, {0x1944, 0x1945}, {0x1809, 0x1809}, {0x1803, 0x1803}, {0x17D4, 0x17D5}, {0x1735, 0x1736}, {0x166E, 0x166E}, {0x1367, 0x1368}, {0x1362, 0x1362}, {0x104A, 0x104B}, {0x0964, 0x0965}, {0x083D, 0x083E}, {0x0839, 0x0839}, {0x0837, 0x0837}, {0x07F9, 0x07F9}, {0x0700, 0x0702}, {0x06D4, 0x06D4}, {0x061D, 0x061F}, {0x0589, 0x0589}, {0x003F, 0x003F}, {0x002E, 0x002E}, {0x0021, 0x0021}, }}, PropSoftDotted: {"Soft Dotted", [][2]rune{ {0x1E068, 0x1E068}, {0x1E04C, 0x1E04D}, {0x1DF1A, 0x1DF1A}, {0x1D692, 0x1D693}, {0x1D65E, 0x1D65F}, {0x1D62A, 0x1D62B}, {0x1D5F6, 0x1D5F7}, {0x1D5C2, 0x1D5C3}, {0x1D58E, 0x1D58F}, {0x1D55A, 0x1D55B}, {0x1D526, 0x1D527}, {0x1D4F2, 0x1D4F3}, {0x1D4BE, 0x1D4BF}, {0x1D48A, 0x1D48B}, {0x1D456, 0x1D457}, {0x1D422, 0x1D423}, {0x2C7C, 0x2C7C}, {0x2148, 0x2149}, {0x2071, 0x2071}, {0x1ECB, 0x1ECB}, {0x1E2D, 0x1E2D}, {0x1DA8, 0x1DA8}, {0x1DA4, 0x1DA4}, {0x1D96, 0x1D96}, {0x1D62, 0x1D62}, {0x0458, 0x0458}, {0x0456, 0x0456}, {0x03F3, 0x03F3}, {0x02B2, 0x02B2}, {0x029D, 0x029D}, {0x0268, 0x0268}, {0x0249, 0x0249}, {0x012F, 0x012F}, {0x0069, 0x006A}, }}, PropTerminalPunctuation: {"Terminal Punctuation", [][2]rune{ /* 116 elements not displayed */ }}, PropUnifiedIdeograph: {"Unified Ideograph", [][2]rune{ {0x31350, 0x323AF}, {0x30000, 0x3134A}, {0x2EBF0, 0x2EE5D}, {0x2CEB0, 0x2EBE0}, {0x2B820, 0x2CEA1}, {0x2B740, 0x2B81D}, {0x2A700, 0x2B739}, {0x20000, 0x2A6DF}, {0xFA27, 0xFA29}, {0xFA23, 0xFA24}, {0xFA21, 0xFA21}, {0xFA1F, 0xFA1F}, {0xFA13, 0xFA14}, {0xFA11, 0xFA11}, {0xFA0E, 0xFA0F}, {0x4E00, 0x9FFF}, {0x3400, 0x4DBF}, }}, PropVariationSelector: {"Variation Selector", [][2]rune{ {0xE0100, 0xE01EF}, {0xFE00, 0xFE0F}, {0x180F, 0x180F}, {0x180B, 0x180D}, }}, PropWhiteSpace: {"White Space", [][2]rune{ {0x3000, 0x3000}, {0x205F, 0x205F}, {0x202F, 0x202F}, {0x2029, 0x2029}, {0x2028, 0x2028}, {0x2000, 0x200A}, {0x1680, 0x1680}, {0x00A0, 0x00A0}, {0x0085, 0x0085}, {0x0020, 0x0020}, {0x0009, 0x000D}, }}, }
Properties is a list of all Unicode properties.
var Scripts = map[Script]struct { Name string Ranges [][2]rune }{ /* 171 elements not displayed */ }
Scripts is a list of all Unicode scripts.
var Unicodes = map[Unicode]struct { Name, Released string }{ Unicode1_1: {"1.1", "June, 1993"}, Unicode2: {"2.0", "July, 1996"}, Unicode2_1: {"2.1", "May, 1998"}, Unicode3: {"3.0", "September, 1999"}, Unicode3_1: {"3.1", "March, 2001"}, Unicode3_2: {"3.2", "March, 2002"}, Unicode4: {"4.0", "April, 2003"}, Unicode4_1: {"4.1", "March, 2005"}, Unicode5: {"5.0", "July, 2006"}, Unicode5_1: {"5.1", "March, 2008"}, Unicode5_2: {"5.2", "October, 2009"}, Unicode6: {"6.0", "October, 2010"}, Unicode6_1: {"6.1", "January, 2012"}, Unicode6_2: {"6.2", "September, 2012"}, Unicode6_3: {"6.3", "September, 2013"}, Unicode7: {"7.0", "June, 2014"}, Unicode8: {"8.0", "June, 2015"}, Unicode9: {"9.0", "June, 2016"}, Unicode10: {"10.0", "June, 2017"}, Unicode11: {"11.0", "June, 2018"}, Unicode12: {"12.0", "March, 2019"}, Unicode12_1: {"12.1", "May, 2019"}, Unicode13: {"13.0", "March, 2020"}, Unicode14: {"14.0", "September, 2021"}, Unicode15: {"15.0", "September, 2022"}, Unicode15_1: {"15.1", "September, 2023"}, Unicode16: {"16.0", "September, 2024"}, UnicodeLatest: {"16.0", "September, 2024"}, }
Unicodes is a list of all Unicode versions since 1.1.
var Widths = map[Width]string{ WidthAmbiguous: "ambiguous", WidthFullWidth: "full", WidthHalfWidth: "half", WidthNarrow: "narrow", WidthNeutral: "neutral", WidthWide: "wide", }
Widths is a list of all Unicode Widths.
Types ¶
type Block ¶
type Block uint16 // Unicode block
func FindBlock ¶
FindBlock finds a block by name.
func (Block) String ¶
type Category ¶
type Category uint8 // Unicode category
func FindCategory ¶
FindCategory finds a category by name.
func (Category) String ¶
type Codepoint ¶
type Codepoint struct { Codepoint rune // The actual codepoint. // contains filtered or unexported fields }
Codepoint represents a single codepoint.
func Find ¶
Find a Codepoint for this rune.
If the second return value is false, the codepoint wasn't found. The Codepoint will have only the Codepoint field set.
func FromString ¶
FromString gets a codepoint from human input.
The input can be as (case-insensitive):
U+F1, U+00F1, UF1, F1 Unicode codepoint notation (hex) 0xF1, xF1 Hex number 0d241 Decimal number 0o361, o361 Octal number 0b11110001 Binary number
func (Codepoint) Aliases ¶
func (Codepoint) Block ¶
Block gets the unicode block.
This only gets the block this codepoint is assigned to; use Codepoint.In() if you want to check if a codepoint is within a block (some blocks are a group of other blocks; for example Number is DecimalNumber + LetterNumber + OtherNumber).
func (Codepoint) Category ¶
Category gets this codepoint's category.
func (Codepoint) Cells ¶
Cells gets the number of cells this codepoint will display as; 0, 1, or 2.
func (Codepoint) Digraph ¶
Digraph gets the digraph sequence.
Digraphs are defined in RFC1345. This adds two digraphs that Vim recognises but are not in the RFC:
=e € U+20AC EURO SIGN =R ₽ U+20BD RUBLE SIGN
func (Codepoint) Display ¶
Display this codepoint. This formats the codepoint as follows:
- Combining characters are prefixed with ◌ (U+25CC)
- C0 control characters use the graphical representation (Control Pictures block, U+2400-2426)
- Other control characters (C1, bidi, tags, some script-specific controls) use open box ␣ (U+2423)
- Everything else is converted to a string without processing.
func (Codepoint) Format ¶
Format the codepoint in the given base.
func (Codepoint) FormatCodepoint ¶
FormatCodepoint formats the codepoint in Unicode notation.
func (Codepoint) HTML ¶
HTML formats the codepoint as an HTML entity, prefering a symbolic name if it exists (e.g. & instead of &)
func (Codepoint) JSON ¶
JSON gets the JSON representation.
func (Codepoint) KeySym ¶
KeySym gets the X11 keysym name.
func (Codepoint) Name ¶
Name gets the name for this codepoint.
func (Codepoint) Plane ¶
Plane gets the Unicode plane.
func (Codepoint) Properties ¶
func (c Codepoint) Properties() PropertyList
Properties gets the unicode properties for this codepoint.
func (Codepoint) Refs ¶
func (Codepoint) Script ¶
func (Codepoint) String ¶
func (Codepoint) UTF16 ¶
UTF16 gets the UTF-16 representation of this codepoint.
The default is to use Little-Endian encoding (which is what Windows uses); set bigEndian to use Big-Endian encoding.
func (Codepoint) UTF8 ¶
UTF8 gets the UTF-8 representation of this codepoint.
func (Codepoint) Unicode ¶
func (Codepoint) Width ¶
Width gets this codepoint's width.
func (Codepoint) XML ¶
XML formats the codepoint as an XML entity.
type Emoji ¶
type Emoji struct { Codepoints []rune // Codepoints in this emoji Name string // Emoji name CLDR []string // CLDR names // contains filtered or unexported fields }
Emoji is an emoji sequence.
func (Emoji) Genders ¶
func (Emoji) Group ¶
func (e Emoji) Group() EmojiGroup
func (Emoji) Skintones ¶
func (Emoji) String ¶
func (Emoji) Subgroup ¶
func (e Emoji) Subgroup() EmojiSubgroup
func (Emoji) With ¶
func (e Emoji) With(mod EmojiModifier, selmod ...EmojiModifier) Emoji
With returns a copy of this emoji with the given modifiers.
type EmojiGroup ¶
type EmojiGroup uint8 // Emoji group.
Emoji is an emoji sequence.
func (EmojiGroup) String ¶
func (e EmojiGroup) String() string
type EmojiModifier ¶
type EmojiModifier uint16
EmojiModifier is a modifier to apply to an emoji to change the gender(s) or skintone(s).
type EmojiSubgroup ¶
type EmojiSubgroup uint16 // Emoji subgroup.
Emoji is an emoji sequence.
func (EmojiSubgroup) String ¶
func (e EmojiSubgroup) String() string
type Plane ¶
type Plane uint8 // Unicode plane
func (Plane) String ¶
type Property ¶
type Property uint8 // Unicode property
func FindProperty ¶
FindProperty finds a property by name.
func (Property) String ¶
type PropertyList ¶
type PropertyList []Property // Unicode property
func (PropertyList) String ¶
func (p PropertyList) String() string
type Script ¶
type Script uint16 // Unicode script.
func FindScript ¶
FindScript finds a script by name.
func (Script) String ¶
type Unicode ¶
type Unicode uint8 // Unicode version
func (Unicode) String ¶
type Width ¶
type Width uint8 // Unicode width
func (Width) String ¶
Source Files ¶
codepoint.go doc.go emoji.go gen_blocks.go gen_cats.go gen_codepoints.go gen_emojis.go gen_names.go gen_props.go gen_scripts.go tables.go
- Version
- v2.8.0 (latest)
- Published
- Sep 10, 2024
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 3 weeks ago –
Tools for package owners.