https://www.unicode.org/reports/tr51/  Copy of https://unicode.org/Public/emoji/12.0/emoji-test.txt
979986
function getEmojiGroups ()
{
    let result = [ ];
    let lines = fs.readFileSync (path.join (__dirname, 'data', 'emoji-test.txt'), { encoding: 'utf8' }).split ('\n');
    let groupName = "";
    let subgroupName = "";
    let matchFound;
    let subgroups;
    let characters;
    for (let line of lines)
    {
        if (line)
        {
            if (matchFound = line.match (/^# group: (.*)$/))
            {
                if (subgroupName)
                {
                    subgroups.push ({ name: subgroupName, characters: characters });
                }
                if (groupName)
                {
                    result.push ({ name: groupName, subgroups: subgroups });
                }
                groupName = matchFound[1];
                subgroups = [ ];
                subgroupName = "";
            }
            else if (matchFound = line.match (/^# subgroup: (.*)$/))
            {
                if (subgroupName)
                {
                    subgroups.push ({ name: subgroupName, characters: characters });
                }
                subgroupName = subgroupNames[matchFound[1]];
                characters = [ ];
            }
            else if (matchFound = line.match (/^#EOF$/))
            {
                if (subgroupName)
                {
                    subgroups.push ({ name: subgroupName, characters: characters });
                }
                if (groupName)
                {
                    result.push ({ name: groupName, subgroups: subgroups });
                }
            }
            else if (matchFound = line.match (/^#/))
            {
                // Ignore any other non-structured comments
            }
            else
            {
                let hashOffset = line.indexOf ('#');
                let data = line.substring (0, hashOffset);
                let fields = data.split (';');
                let codePoints = fields[0].trim ().split (' ');
                let status = fields[1].trim ();
                if ((status === "component") || (status === "fully-qualified"))
                {
                    let emojiString = "";
                    for (let codePoint of codePoints)
                    {
                        emojiString += String.fromCodePoint (parseInt (codePoint, 16));
                    }
                    characters.push (emojiString);
                }
            }
        }
    }
    return result;
}
774918
public static boolean isEmoji(String string) {
    if (string == null) return false;

    EmojiParser.UnicodeCandidate unicodeCandidate = EmojiParser.getNextUnicodeCandidate(string.toCharArray(), 0);
    return unicodeCandidate != null &&
            unicodeCandidate.getEmojiStartIndex() == 0 &&
            unicodeCandidate.getFitzpatrickEndIndex() == string.length();
  }
480048
public static Emoji getForAlias(String alias) {
    if (alias == null) {
      return null;
    }
    return EMOJIS_BY_ALIAS.get(trimAlias(alias));
  }
1312698
def com_google_fonts_check_name_unwanted_chars(ttFont):
  """"""
  failed = False
  replacement_map = [("\u00a9", '(c)'),
                     ("\u00ae", '(r)'),
                     ("\u2122", '(tm)')]
  for name in ttFont['name'].names:
    string = str(name.string, encoding=name.getEncoding())
    for mark, ascii_repl in replacement_map:
      new_string = string.replace(mark, ascii_repl)
      if string != new_string:
        yield FAIL, ("NAMEID #{} contains symbol that should be"
                     " replaced by '{}'.").format(name.nameID,
                                                  ascii_repl)
        failed = True
  if not failed:
    yield PASS, ("No need to substitute copyright, registered and"
                 " trademark symbols in name table entries of this font.")
1196573
function getUrlToken({ tokens, intEmphasis, num }) {
  const urlContent = `(${getAttr(tokens[num].attrs, 'href')})`;
  const urlLength = urlContent.length;
  const punctuation1 = {
    type: "punctuation",
    content: "[",
    length: 1
  };
  const punctuation2 = {
    type: "punctuation",
    content: "]",
    length: 1
  };
  const urlContentObj = {
    type: "punctuation",
    content: urlContent,
    length: urlLength
  };
  const content = Array.isArray(intEmphasis) ?
    [punctuation1, ...intEmphasis, punctuation2, urlContentObj] :
    [punctuation1, intEmphasis, punctuation2, urlContentObj];
  return {
    type: "url",
    content,
    length: Array.isArray(intEmphasis) ? getTokensLength(content) : 1 + intEmphasis.length + 1 + urlLength
  };
}
105815
function toGemoji(node) {
  var value = toString(node)
  var info = (unicodes[value] || emoticons[value] || {}).shortcode

  if (info) {
    node.value = info
  }
}
298051
def poll(poll, msg, server):
    """"""
    poll = remove_smart_quotes(poll.replace(u"\u2014", u"--"))

    try:
        args = ARGPARSE.parse_args(shlex.split(poll)).poll
    except ValueError:
        return ERROR_INVALID_FORMAT

    if not 2 < len(args) < len(POLL_EMOJIS) + 1:
        return ERROR_WRONG_NUMBER_OF_ARGUMENTS

    result = ["Poll: {}\n".format(args[0])]
    for emoji, answer in zip(POLL_EMOJIS, args[1:]):
        result.append(":{}: {}\n".format(emoji, answer))

    # for this we are going to need to post the message to Slack via Web API in order to
    #  get the TS and add reactions
    msg_posted = server.slack.post_message(
        msg['channel'], "".join(result), as_user=server.slack.username)
    ts = json.loads(msg_posted)["ts"]
    for i in range(len(args) - 1):
        server.slack.post_reaction(msg['channel'], ts, POLL_EMOJIS[i])
200209
def emojies_in(text)
      (sad_emojies + happy_emojies).map do |emoji|
        text.scan(emoji)
      end.flatten
    end
1067351
public static boolean isEmoji(char c) {
		return false ==  ((c == 0x0) || //
				(c == 0x9) || //
				(c == 0xA) || //
				(c == 0xD) || //
				((c >= 0x20) && (c <= 0xD7FF)) || //
				((c >= 0xE000) && (c <= 0xFFFD)) || //
				((c >= 0x10000) && (c <= 0x10FFFF)));
	}
1114555
function qtext() {
        return wrap('qtext', or(
            function qtextFunc1() {
                return compareToken(function qtextFunc2(tok) {
                    var code = tok.charCodeAt(0);
                    var accept =
                        (33 === code) ||
                        (35 <= code && code <= 91) ||
                        (93 <= code && code <= 126);
                    if (opts.rfc6532) {
                        accept = accept || isUTF8NonAscii(tok);
                    }
                    return accept;
                });
            },
            obsQtext
        )());
    }
1274803
def rex_text(self, regexp, flags=0, byte=False, default=NULL):
        

        # pylint: disable=no-member
        try:
            match = self.rex_search(regexp, flags=flags, byte=byte)
        except DataNotFound:
            if default is NULL:
                raise DataNotFound('Regexp not found')
            else:
                return default
        else:
            return normalize_space(decode_entities(match.group(1)))
810205
def com_google_fonts_check_font_copyright(ttFont):
  """"""
  import re
  from fontbakery.utils import get_name_entry_strings

  failed = False
  for string in get_name_entry_strings(ttFont, NameID.COPYRIGHT_NOTICE):
    does_match = re.search(r'Copyright [0-9]{4} The .* Project Authors \([^\@]*\)',
                           string)
    if does_match:
      yield PASS, ("Name Table entry: Copyright field '{}'"
                   " matches canonical pattern.").format(string)
    else:
      failed = True
      yield FAIL, ("Name Table entry: Copyright notices should match"
                   " a pattern similar to:"
                   " 'Copyright 2017 The Familyname"
                   " Project Authors (git url)'\n"
                   "But instead we have got:"
                   " '{}'").format(string)
  if not failed:
    yield PASS, "Name table copyright entries are good"
68349
function toEmoji(node) {
  var value = toString(node)
  var info = (shortcodes[value] || emoticons[value] || {}).emoji

  if (info) {
    node.value = info
  }
}
789393
public void showEmojiLayout() {
        hideSoftInput(getContext(), this);
        int keyboardHeight;
        if (mCurrentContentHeight == 0) {
            keyboardHeight = getDefaultEmojiHeight();
            mCurrentContentHeight = mRawLayoutHeight - keyboardHeight;
        } else {
            keyboardHeight = mRawLayoutHeight - mCurrentContentHeight;
        }

        LayoutParams contentParams = (LayoutParams) mContentLayout.getLayoutParams();
        contentParams.height = mCurrentContentHeight;
        contentParams.weight = 0;
        LayoutParams emojiParams = (LayoutParams) mEmojiLayout.getLayoutParams();
        emojiParams.height = keyboardHeight;
        emojiParams.weight = 0;
        mEmojiLayout.setVisibility(VISIBLE);
        requestLayout();
        isEmojiLayoutShow = true;
    }
824174
function atext() {
        return wrap('atext', compareToken(function atextFunc(tok) {
            var accept =
                ('a' <= tok && tok <= 'z') ||
                ('A' <= tok && tok <= 'Z') ||
                ('0' <= tok && tok <= '9') ||
                (['!', '#', '$', '%', '&', '\'', '*', '+', '-', '/',
                  '=', '?', '^', '_', '`', '{', '|', '}', '~'].indexOf(tok) >= 0);
            if (opts.rfc6532) {
                accept = accept || isUTF8NonAscii(tok);
            }
            return accept;
        }));
    }
824462
public function findByUnicode($unicode)
    {
        if (isset($this->emojiUnicodes[$unicode]) && isset($this->emojis[$this->emojiUnicodes[$unicode]])) {
            return $this->emojis[$this->emojiUnicodes[$unicode]];
        }
    }
669568
def emoji(string):
    '''
    '''
    __entities = {}
    __value = []
    __mean = []
    __location = []
    flag = True
    try:
        pro_string = str(string)
        for pos,ej in enumerate(pro_string):
            if ej in emo_unicode.UNICODE_EMO:
                try:
                    __value.append(ej)
                    __mean.append(emo_unicode.UNICODE_EMO[ej])
                    __location.append([pos,pos])
                except Exception as e:
                    flag = False
                    __entities.append({"flag": False})
                    return __entities

    except Exception as e:
        flag = False
        __entities.append({"flag": False})
        return __entities
    if len(__value) < 1:
        flag = False    
    __entities = {
        'value' : __value,
        'mean' : __mean,
        'location' : __location,
        'flag' : flag
    }

    return __entities