Rule that matches any character not contained in the char sequence specified. @param string char sequence not to match @return rule
(CharSequence string)
| 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 |