A scanner that matches the input against the specified string case insensitively.
@param str the string to match
@return the scanner.
3486
public static Parser<Void> stringCaseInsensitive(String str) {
    return Patterns.stringCaseInsensitive(str).toScanner(str);
  }
1144496
public boolean match(String str, String regex) {
		if (str == null || regex == null)
			return false;
		if (regex.trim().isEmpty())
			return true;
		return Pattern.compile(regex.trim()).matcher(str).find();
	}
885047
protected String nullIfEmpty(String str) {
        return (str == null || str.trim().length() == 0) ? null : str;
    }
1023922
public boolean satisfy(String str) {

        int state = 0;
        for (String nregex : negative) {
            if (Pattern.matches(nregex, str)) {
                return false;
            }
        }

        int count = 0;
        for (String pregex : positive) {
            if (Pattern.matches(pregex, str)) {
                count++;
            }
        }
        if (count == 0) {
            return false;
        } else {
            return true;
        }

    }
613405
public static StrMatcher charSetMatcher(final String chars) {
        if (StringUtils.isEmpty(chars)) {
            return NONE_MATCHER;
        }
        if (chars.length() == 1) {
            return new CharMatcher(chars.charAt(0));
        }
        return new CharSetMatcher(chars.toCharArray());
    }
1036486
public BooleanExpression contains(Expression<String> str) {
        return Expressions.booleanOperation(Ops.STRING_CONTAINS, mixin, str);
    }
1182987
public static int getStringCase(String str) {
        if (str.length() == 0) {
            return MIXED;
        }

        int state = -1;

        char ch = str.charAt(0);
        if (Character.isLetter(ch)) {
            if (Character.isUpperCase(ch)) {
                state = UPPER_CASE;
            } else {
                state = LOWER_CASE;
            }
        }

        for (int i = 1; i < str.length(); i++) {
            ch = str.charAt(i);
            if (!Character.isLetter(ch)) {
                continue;
            }

            switch (state) {
                case UPPER_CASE:
                    if (Character.isLowerCase(ch)) {
                        if (i == 1) {
                            state = TITLE_CASE;
                        } else {
                            return MIXED;
                        }
                    }
                    break;
                case LOWER_CASE:
                case TITLE_CASE:
                    if (Character.isUpperCase(ch)) {
                        return MIXED;
                    }
                    break;
            }
        }

        return state;
    }
1084480
public static String decode(String str)
    {
        String ret = str;

        try
        {
            // De-obfuscate the string
            if(ret != null)
                ret = new String(Base64.decodeBase64(ret.getBytes()));
        }
        catch(NoClassDefFoundError e)
        {
            System.out.println("WARNING: unable to decode: "
                +e.getClass().getName()+": "+e.getMessage());
        }

        return ret;
    }
890795
public static boolean matchesAny(String str, List<String> regexes) {
        return matchesAny(str, regexes, true);
    }
469897
public BooleanExpression likeIgnoreCase(String str) {
        return Expressions.booleanOperation(Ops.LIKE_IC, mixin, ConstantImpl.create(str));
    }
424632
function ( str ) {
            str = String( str );
    
            if ( str ) {
                if ( /^\s*true\s*$/.test(str) ) {
                    str = Boolean( str );
                } else if ( /^\s*false\s*$/.test(str) ) {
                    str = Boolean();
                } else if ( /^\s*-*[0-9\.]+\s*$/.test(str) ) {
                    str = Number( str );
                } else if ( /^\s*null\s*$/.test(str) ) {
                    str = null;
                } else if ( /^\s*undefined\s*$/.test(str) ) {
                    str = undefined;
                }
            }
            return str;
        }
816202
public static String getSha(String str)
    {
        Check.notNull(str);

        return getSha(str.getBytes(StandardCharsets.UTF_8));
    }
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;
   }
824345
public static String decode(String str) {
		try {
			return URLDecoder.decode(str, "UTF-8");
		} catch (UnsupportedEncodingException e) {
			//should never happen
			throw new RuntimeException(e);
		}
	}
1066993
public boolean contains(String str)
    {
        if (sourceNode != null)      //if the MDAG hasn't been simplified
        {
            MDAGNode targetNode = sourceNode.transition(str.toCharArray());
            return (targetNode != null && targetNode.isAcceptNode());
        }
        else
        {
            SimpleMDAGNode targetNode = simplifiedSourceNode.transition(mdagDataArray, str.toCharArray());
            return (targetNode != null && targetNode.isAcceptNode());
        }
    }
1351539
public BooleanExpression containsIgnoreCase(Expression<String> str) {
        return Expressions.booleanOperation(Ops.STRING_CONTAINS_IC, mixin, str);
    }
952094
public static String regexFindFirst(String pattern, String str) {
    return regexFindFirst(Pattern.compile(pattern), str, 1);
  }