data

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CombiningDiacritical  = _CombiningDiacritical  // Unicode block "Combining Diacritical Marks for Symbols"
	RegionalIndicator     = _RegionalIndicator     // Subset of "Enclosed Alphanumeric Supplement" used for flag regional indicators
	EmojiSkinToneModifier = _EmojiSkinToneModifier // A.k.a. "EMOJI MODIFIER FITZPATRICK TYPE-(1-2|3|4|5|6)"
	Tag                   = _Tag                   // Unicode block "Tags" used for subnational flag sequences
)

These variables have type *unicode.RangeTable.

View Source
var (
	BasicEmojiGroupRegex            = regexp.MustCompile(fmt.Sprintf(";\\s+%v\\s*[;#]", BasicEmoji))
	EmojiKeyCapSequenceGroupRegex   = regexp.MustCompile(fmt.Sprintf(";\\s+%v\\s*[;#]", EmojiKeyCapSequence))
	EmojiFlagSequenceGroupRegex     = regexp.MustCompile(fmt.Sprintf(";\\s+%v\\s*[;#]", EmojiFlagSequence))
	EmojiTagSequenceGroupRegex      = regexp.MustCompile(fmt.Sprintf(";\\s+%v\\s*[;#]", EmojiTagSequence))
	EmojiModifierSequenceGroupRegex = regexp.MustCompile(fmt.Sprintf(";\\s+%v\\s*[;#]", EmojiModifierSequence))
	EmojiZWJSequenceGroupRegex      = regexp.MustCompile(fmt.Sprintf(";\\s+%v\\s*[;#]", EmojiZWJSequence))
)
View Source
var (
	BasicEmojiGroup            = parseSequencesMatching(BasicEmojiGroupRegex)
	EmojiKeyCapSequenceGroup   = parseSequencesMatching(EmojiKeyCapSequenceGroupRegex)
	EmojiFlagSequenceGroup     = parseSequencesMatching(EmojiFlagSequenceGroupRegex)
	EmojiTagSequenceGroup      = parseSequencesMatching(EmojiTagSequenceGroupRegex)
	EmojiModifierSequenceGroup = parseSequencesMatching(EmojiModifierSequenceGroupRegex)
	EmojiZWJSequenceGroup      = parseSequencesMatching(EmojiZWJSequenceGroupRegex)
)
View Source
var EmojiSequences string
View Source
var EmojiZwjSequences string

Functions

func ParseRangeTable

func ParseRangeTable(group EmojiGroup) *unicode.RangeTable

ParseRangeTable parses the specified Unicode.org data file for characters in the specified group, and returns a range table of those characters.

Note that the range table reflects the ranges as defined in the source files; ranges are guaranteed not to overlap, as per the RangeTable docs, but adjacent ranges are not coalesced.

Types

type EmojiGroup

type EmojiGroup string
const (
	BasicEmoji            EmojiGroup = "Basic_Emoji"
	EmojiKeyCapSequence   EmojiGroup = "Emoji_Keycap_Sequence"
	EmojiFlagSequence     EmojiGroup = "RGI_Emoji_Flag_Sequence"
	EmojiTagSequence      EmojiGroup = "RGI_Emoji_Tag_Sequence;"
	EmojiModifierSequence EmojiGroup = "RGI_Emoji_Modifier_Sequence"
	EmojiZWJSequence      EmojiGroup = "RGI_Emoji_ZWJ_Sequence"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL