isemoji

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: MIT Imports: 0 Imported by: 1

README

go-isemoji

go reportcard GoDoc license

Go library to test if a string is an emoji.

Usage

isemoji.IsEmoji("🤗")    // True
isemoji.IsEmoji("test")  // False
isemoji.IsEmoji("🙇🏼‍♂️🤗")  // False, because there are multiple emojis
isemoji.Name("👨🏼‍🦰")       // "man: medium-light skin tone, red hair"

Find the full documentation on godoc.

License

This project is under the MIT License.

Documentation

Overview

Package isemoji helps you determine whether a string is an emoji.

Index

Constants

View Source
const EmojiVersion = "14.0"

Variables

This section is empty.

Functions

func IsEmoji

func IsEmoji(s string) bool

IsEmoji returns true if the provided string contains one fully-qualified emoji. Component emojis are also valid.

See the follow document for definitions of fully-qualified and component:

https://www.unicode.org/reports/tr51/#def_qualified_emoji_character

func IsEmojiNonStrict

func IsEmojiNonStrict(s string) bool

IsEmojiNonStrict returns true if the provided string contains one emoji. fully-qualified, minimally-qualified, unqualified, and component emojis all return true.

See the follow document for definitions of those terms:

https://www.unicode.org/reports/tr51/#def_qualified_emoji_character

func Name

func Name(s string) string

Name returns the Unicode name for the emoji. It returns an empty string if the provided string is not an emoji.

Types

This section is empty.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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