mirror of
https://github.com/emojisum/emojisum.git
synced 2025-08-03 13:50:27 +00:00
emoji: a couple of flags (it's the letters)
This needs a fix to the representation of combined unicodes. Perhaps every item in the list needs to be a list of lists? or just to split the string? Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
95f9a846e6
commit
9e38b5a8bb
2 changed files with 5 additions and 4 deletions
|
@ -28,7 +28,8 @@ type VersionedMap struct {
|
|||
}
|
||||
|
||||
// Words are a set of options to represent an emoji.
|
||||
// Possible options could be the ":colon_notation:" or a "U+26CF" style codepoint.
|
||||
// Possible options could be the ":colon_notation:", a "U+26CF" style
|
||||
// codepoint, or the unicode value itself.
|
||||
type Words []string
|
||||
|
||||
// IsColonNotation checks for whether a word is the :colon_notation: of emoji
|
||||
|
@ -36,7 +37,7 @@ func IsColonNotation(word string) bool {
|
|||
return strings.HasPrefix(word, ":") && strings.HasSuffix(word, ":")
|
||||
}
|
||||
|
||||
// IsCodepoint checks for whether a word is the "U+1234" codepoint style of emoji
|
||||
// IsCodepoint checks for whether a word is the "U+1234" codepoint style of emoji. Codepoints can sometimes be a combo, like flags
|
||||
func IsCodepoint(word string) bool {
|
||||
return strings.HasPrefix(strings.ToUpper(word), "U+")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue