Beispiel #1
0
        public static bool IsEmoji(string input)
        {
            if (input == null)
            {
                return(false);
            }
            var chars  = input.ToCharArray();
            var result = EmojiParser.GetEmojiInPosition(chars, 0);

            return(result != null && result.StartIndex == 0 && result.LastIndex == chars.Length);
        }
Beispiel #2
0
        public static Emoji GetByUnicode(string unicode)
        {
            if (string.IsNullOrEmpty(unicode))
            {
                return(null);
            }
            var res = EmojiParser.GetEmojiInPosition(unicode.ToCharArray(), 0);

            if (res == null)
            {
                return(null);
            }
            return(res.Emoji);
        }