MCPcopy Create free account
hub / github.com/cschanck/single-file-java / noneOf

Method noneOf

src/main/java/org/sfj/PegLegParser.java:727–739  ·  view source on GitHub ↗

Rule that matches any character not contained in the char sequence specified. @param string char sequence not to match @return rule

(CharSequence string)

Source from the content-addressed store, hash-verified

725 * @return rule
726 */
727 public CharTerminal<V> noneOf(CharSequence string) {
728 return new CharTerminal<>((ignoreCase) -> {
729 get().pushFrame("noneOf(" + string + ")");
730 int n = get().nextChar();
731 if (n >= 0) {
732 for (int i = 0; i < string.length(); i++) {
733 if (isCharMatch(ignoreCase, string.charAt(i), (char) n)) { return get().ruleReturn(false, false); }
734 }
735 return get().ruleReturn(true, true);
736 }
737 return get().ruleReturn(false, false);
738 });
739 }
740
741 public PegLegRule<V> eof() { return this::eofRule; }
742

Callers 2

normalCharMethod · 0.80
normalCharMethod · 0.80

Calls 5

getMethod · 0.95
isCharMatchMethod · 0.95
pushFrameMethod · 0.80
ruleReturnMethod · 0.80
nextCharMethod · 0.45

Tested by 1

normalCharMethod · 0.64