Tests if a given String is an emoji.

@param string the string to test

@return true if the string is an emoji's unicode, false else
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();
  }
692843
public static boolean isJavaLangType(String s) {
		return getJavaDefaultTypes().contains(s) && Character.isUpperCase(s.charAt(0));
	}
99051
static boolean isEvenQuotes(String string) {
        // In principle, we could use the regex given by:
        // Pattern pEvenQuotes = Pattern.compile("([^\"]*\\\"[^\"]*\\\")*[^\"]*");
        // We assume just counting the instances of double quotes is more efficient
        // but we haven't really tested that assumption.

        boolean even = true;
        for (int i = 0; i < string.length(); i++) {
            if (string.charAt(i) == '\"') {
                even = !even;
            }
        }
        return even;
    }
435962
def is_symbol(string):
    
    return (
        is_int(string) or is_float(string) or
        is_constant(string) or is_unary(string) or
        is_binary(string) or
        (string == '(') or (string == ')')
    )
209148
public static boolean isJavaIdentifier( String str ) {
      if( str.length() == 0 || !Character.isJavaIdentifierStart( str.charAt( 0 ) ) ){
         return false;
      }
      for( int i = 1; i < str.length(); i++ ){
         if( !Character.isJavaIdentifierPart( str.charAt( i ) ) ){
            return false;
         }
      }
      return true;
   }
499563
public static function isJson (string $string) : bool
    {
        if (is_numeric($string) || $string === 'true' || $string === 'false' || $string === 'null' || empty($string)) :
            return false;
        endif;

        // try to decode string
        json_decode($string);

        // check if error occured
        return json_last_error() === JSON_ERROR_NONE;
    }
473784
public static boolean isNumeric(String string) {
        if (string == null || string.length() == 0)
            return false;

        int l = string.length();
        for (int i = 0; i < l; i++) {
            if (!Character.isDigit(string.codePointAt(i)))
                return false;
        }
        return true;
    }
893365
public static function checkUtf8Encoding($string)
    {
        if (!mb_check_encoding($string, 'UTF-8') ||
            !$string == mb_convert_encoding(mb_convert_encoding($string, 'UTF-32', 'UTF-8'), 'UTF-8', 'UTF-32')
        ) {
            return false;
        }

        return true;
    }
739371
public static function isApplicable($string)
    {
        $firstline = strtok($string, "\r\n\t");

        return strpos($firstline, ':20:AI') !== false && strlen($firstline) === 20;
    }
1246551
public static boolean isValidJavaIdentifier(String s)
	{
		if (s == null || s.length() == 0)
		{
			return false;
		}

		if (isJavaKeyword(s))
		{
			return false;
		}

		char[] c = s.toCharArray();
		if (!Character.isJavaIdentifierStart(c[0]))
		{
			return false;
		}

		for (int i = 1; i < c.length; i++)
		{
			if (!Character.isJavaIdentifierPart(c[i]))
			{
				return false;
			}
		}

		return true;
	}
200853
private function isValidText($string)
    {
        $search = array(" ", "　", "\n", "\r", "\t");
        $replace = array("", "", "", "", "");
        return str_replace($search, $replace, $string) !== '';
    }
420208
public static boolean isOnlyUpperCase(String string) {
        boolean result = isNotEmpty(string);
        int idx = 0;
        int len = string.length();
        while (result) {
            if (idx >= len) {
                break;
            }
            result = isUpperCase(string.charAt(idx));
            idx++;
        }
        return result;
    }
236732
public static int countEmojis(String text) {

		String htmlifiedText = htmlify(text);
		// regex to identify html entitities in htmlified text
		Matcher matcher = htmlEntityPattern.matcher(htmlifiedText);

		int counter = 0;
		while (matcher.find()) {
			String emojiCode = matcher.group();
			if (isEmoji(emojiCode)) {
				counter++;
			}
		}
		return counter;
	}
984171
public static function isApplicable($string)
    {
        static $token = "\r\n\t";
        /** @noinspection UnusedFunctionResultInspection */
        strtok($string, $token);
        $secondline = strtok($token);
        return strpos($secondline, ':25:TRIODOSBANK') !== false;
    }
1327997
def is_unicode_string(string):
    """"""
    try:
        if sys.version_info >= (3, 0):
            # isn't a python 3 str actually unicode
            if not isinstance(string, str):
                string.decode('utf-8')

        else:
            string.decode('utf-8')
    except UnicodeError:
        raise aomi.exceptions.Validation('Not a unicode string')
496034
protected function hasExpressions(string $string): bool
    {
        foreach (self::STOPS as $symbol) {
            if (strpos($string, $symbol) !== false) {
                return true;
            }
        }

        return false;
    }
93512
public Emoji getEmoji(String unicode) {
    Node tree = root;
    for (char c : unicode.toCharArray()) {
      if (!tree.hasChild(c)) {
        return null;
      }
      tree = tree.getChild(c);
    }
    return tree.getEmoji();
  }