A predicate which returns true for a {@code String} iff at least one of its characters
matches the provided {@link CharMatcher}
969496
public static final Predicate<String> anyCharMatches(final CharMatcher matcher) {
    return new Predicate<String>() {
      @Override
      public boolean apply(@Nullable final String input) {
        return matcher.matchesAnyOf(input);
      }
    };
  }
31447
static boolean matchPath(String[] tokenizedPattern, String[] strDirs, boolean isCaseSensitive) {
        int patIdxStart = 0;
        int patIdxEnd = tokenizedPattern.length - 1;
        int strIdxStart = 0;
        int strIdxEnd = strDirs.length - 1;

        // up to first '**'
        while (patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd) {
            String patDir = tokenizedPattern[patIdxStart];
            if (patDir.equals(DEEP_TREE_MATCH)) {
                break;
            }
            if (!match(patDir, strDirs[strIdxStart], isCaseSensitive)) {
                return false;
            }
            patIdxStart++;
            strIdxStart++;
        }
        if (strIdxStart > strIdxEnd) {
            // String is exhausted
            for (int i = patIdxStart; i <= patIdxEnd; i++) {
                if (!tokenizedPattern[i].equals(DEEP_TREE_MATCH)) {
                    return false;
                }
            }
            return true;
        } else {
            if (patIdxStart > patIdxEnd) {
                // String not exhausted, but pattern is. Failure.
                return false;
            }
        }

        // up to last '**'
        while (patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd) {
            String patDir = tokenizedPattern[patIdxEnd];
            if (patDir.equals(DEEP_TREE_MATCH)) {
                break;
            }
            if (!match(patDir, strDirs[strIdxEnd], isCaseSensitive)) {
                return false;
            }
            patIdxEnd--;
            strIdxEnd--;
        }
        if (strIdxStart > strIdxEnd) {
            // String is exhausted
            for (int i = patIdxStart; i <= patIdxEnd; i++) {
                if (!tokenizedPattern[i].equals(DEEP_TREE_MATCH)) {
                    return false;
                }
            }
            return true;
        }

        while (patIdxStart != patIdxEnd && strIdxStart <= strIdxEnd) {
            int patIdxTmp = -1;
            for (int i = patIdxStart + 1; i <= patIdxEnd; i++) {
                if (tokenizedPattern[i].equals(DEEP_TREE_MATCH)) {
                    patIdxTmp = i;
                    break;
                }
            }
            if (patIdxTmp == patIdxStart + 1) {
                // '**/**' situation, so skip one
                patIdxStart++;
                continue;
            }
            // Find the pattern between padIdxStart & padIdxTmp in str between
            // strIdxStart & strIdxEnd
            int patLength = (patIdxTmp - patIdxStart - 1);
            int strLength = (strIdxEnd - strIdxStart + 1);
            int foundIdx = -1;
            strLoop:
            for (int i = 0; i <= strLength - patLength; i++) {
                for (int j = 0; j < patLength; j++) {
                    String subPat = tokenizedPattern[patIdxStart + j + 1];
                    String subStr = strDirs[strIdxStart + i + j];
                    if (!match(subPat, subStr, isCaseSensitive)) {
                        continue strLoop;
                    }
                }

                foundIdx = strIdxStart + i;
                break;
            }

            if (foundIdx == -1) {
                return false;
            }

            patIdxStart = patIdxTmp;
            strIdxStart = foundIdx + patLength;
        }

        for (int i = patIdxStart; i <= patIdxEnd; i++) {
            if (!tokenizedPattern[i].equals(DEEP_TREE_MATCH)) {
                return false;
            }
        }

        return true;
    }
496627
public static boolean noneSatisfyCodePoint(String string, CodePointPredicate predicate)
    {
        int size = string.length();
        for (int i = 0; i < size; )
        {
            int codePoint = string.codePointAt(i);
            if (predicate.accept(codePoint))
            {
                return false;
            }
            i += Character.charCount(codePoint);
        }
        return true;
    }
136332
function containsCharacter(string, char1, fromIndex, stopCharacterTable) {
  var len = string.length;
  for (var i = fromIndex; i < len; ++i) {
    var ch = string.charCodeAt(i);

    if (ch === char1) {
      return true;
    }
    else if (stopCharacterTable[ch] === 1) {
      return false;
    }
  }
  return false;
}
706786
protected boolean verifyPatternMatch(String text) {
		if (this.expectedPattern == null) {
			return false;
		}
		return this.expectedPattern.matcher(text).matches();
	}
3098
public static Validation<String> contains(String c) {
        return contains(c, I18N_MAP.get(i18nPrefix + "CONTAINS"));
    }
834201
private static boolean containsSpecialCharacter(String value) {
        for (int x = 0; x < value.length(); x++) {
            char c = value.charAt(x);
            if (c == '?' || c == '*') {
                return true;
            } else if (c == '\\') {
                //skip the next character because it is quoted
                x += 1;
            }
        }
        return false;
    }
1248314
protected boolean verifyStringMatch(String text) {
		if (text == null) {
			return false;
		}
		if (!this.caseSensitive) {
			text = text.toLowerCase();
		}
		return text.equals(this.expectedString);
	}
325125
public <E extends Exception> boolean allMatch(Try.CharPredicate<E> filter) throws E {
        return allMatch(0, size(), filter);
    }
537088
private boolean forwardMatch(String match, boolean ignoreCase, boolean resetOnTrue)
      throws
      IOException
  {
    Mark mark = reader.mark();
    List<Integer> cbuf = Lists.newArrayList();
    StringBuilder builder = new StringBuilder();

    boolean result = true;
    boolean seenChar = false;

    while (true)
    {
      cbuf.add(reader.next());

      char ch = (char) reader.curChar;

      if (reader.curChar == -1)
      {
        result = false;
        break;
      }
      else if (WHITESPACE.matches(ch))
      {
        if (seenChar)
        {
          builder.append(ch);
        }
      }
      else
      {
        if (builder.length() == 0)
        {
          seenChar = true;
        }
        builder.append(ch);
        int index = builder.length() - 1;

        if (!ignoreCase
            && (builder.charAt(index) == match.charAt(index)))
        {
          result = false;
          break;
        }

        if (ignoreCase
            && (Ascii.toLowerCase(builder.charAt(index)) != Ascii
            .toLowerCase(match.charAt(index))))
        {
          result = false;
          break;
        }
      }

      if (builder.length() == match.length())
      {
        if (!match.equalsIgnoreCase(builder.toString()))
        {
          result = false;
        }
        break;
      }
    }

    if (!result || resetOnTrue)
    {
      reader.unread(cbuf, mark);
    }

    return result;
  }
326182
public List<RuleMatch> check(AnnotatedText annotatedText, boolean tokenizeText, ParagraphHandling paraMode, RuleMatchListener listener) throws IOException {
    return check(annotatedText, tokenizeText, paraMode, listener, Mode.ALL);
  }
149580
@Deprecated
    public static boolean allSatisfy(String string, CharPredicate predicate)
    {
        return StringIterate.allSatisfyChar(string, predicate);
    }
1124417
public boolean equalsIgnoreCase(CharSequence x) {
        if (x == this) return true;
        if (null == x || size() != x.length()) return false;
        if (isEmpty() && x.length() == 0) return true;
        return regionMatches(true, 0, x, 0, size());
    }
843720
boolean checkPrefix(char[] chars, int[] cursor) {
    if (prefix == null)
      return true;
    else
      return matchClause(prefix, chars, cursor);
  }
387259
final public Selector Predicate() throws ParseException {
                         Selector ans;
    if (jj_2_1(2147483647)) {
      ans = ComparisonPredicate();
    } else if (jj_2_2(2147483647)) {
      ans = NullPredicate();
    } else if (jj_2_3(2147483647)) {
      ans = BetweenPredicate();
    } else if (jj_2_4(2147483647)) {
      ans = LikePredicate();
    } else if (jj_2_5(2147483647)) {
      ans = JMSSetPredicate();
    } else {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 7:
      case 8:
      case 11:
      case TRUE:
      case FALSE:
      case IDENTIFIER:
      case QUOTED_IDENTIFIER:
      case INTEGER_LITERAL:
      case FLOATING_POINT_LITERAL:
      case STRING_LITERAL:
        ans = Expression();
        break;
      default:
        jj_la1[3] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
    }
    {if (true) return ans;}
    throw new Error("Missing return statement in function");
  }
560102
private Selector parsePredicate(String predicate, String fullPath) 
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.entry(cclass,
               "parsePredicate",
               "predicate: " + predicate); 

    Selector parsed = null;
    try
    {
      // Preprocess predicate for special characters
      String parserInput = preProcessForSpecials(predicate);
      
      // Attempt to parse predicate with "JMS" parser
      predicateParser =  MatchParserImpl.prime(predicateParser, parserInput, true);     
      parsed = predicateParser.getSelector(parserInput);
      if (parsed.getType() == Selector.INVALID)
      {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
          tc.debug(this,cclass, "parsePredicate", "Unable to parse predicate");           
        // reset the output to null
        parsed = null;
      }
      else
      {
        postProcessSelectorTree(parsed, fullPath);
      }
    }
    catch (Exception ex)
    {
      // No FFDC Code Needed.
      // In this case we will only trace the exception that we encountered.
      // It could be that the XPath parser is able to process this predicate
      // and that we've encountered a discrepancy between the syntax of an
      // expression supported by JMS and by XPath.
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        tc.debug(this,cclass, "parsePredicate", ex);   
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.exit(this,cclass, "parsePredicate", parsed);     
    return parsed;
  }
175928
public static boolean contains(String regex, CharSequence content) {
		if (null == regex || null == content) {
			return false;
		}

		final Pattern pattern = PatternPool.get(regex, Pattern.DOTALL);
		return contains(pattern, content);
	}