Returns a {@code char} matcher that matches any character except the one specified.

<p>To negate another {@code CharMatcher}, use {@link #negate()}.
542337
public static CharMatcher isNot(final char match) {
    return new FastMatcher() {
      @Override public boolean matches(char c) {
        return c != match;
      }

      @Override public CharMatcher and(CharMatcher other) {
        return other.matches(match) ? super.and(other) : other;
      }

      @Override public CharMatcher or(CharMatcher other) {
        return other.matches(match) ? ANY : this;
      }

      @GwtIncompatible("java.util.BitSet")
      @Override
      void setBits(BitSet table) {
        table.set(0, match);
        table.set(match + 1, Character.MAX_VALUE + 1);
      }

      @Override public CharMatcher negate() {
        return is(match);
      }

      @Override public String toString() {
        return "CharMatcher.isNot('" + showCharacter(match) + "')";
      }
    };
  }
9315
static Matcher combineCharSeqAfterIndexOf(Matcher matcher) {
    if (matcher instanceof IndexOfMatcher) {
      IndexOfMatcher m = matcher.as();
      Matcher next = PatternUtils.head(m.next());
      if (next instanceof CharSeqMatcher) {
        String pattern = m.pattern() + next.<CharSeqMatcher>as().pattern();
        return new IndexOfMatcher(pattern, PatternUtils.tail(m.next()));
      }
    }
    return matcher;
  }
884376
public static Character checkNull(Character value, char elseValue) {
        return checkNull(value, Character.valueOf(elseValue));
    }
405941
public static CharPredicate isChar(final char c) {
    return new CharPredicate() {
      @Override public boolean isChar(char x) {
        return x == c;
      }
      @Override public String toString() {
        return Character.toString(c);
      }
    };
  }
917957
def exclude_chars(text, exclusion=None):
    
    exclusion = [] if exclusion is None else exclusion
    regexp = r"|".join([select_regexp_char(x) for x in exclusion]) or r''
    return re.sub(regexp, '', text)
797334
def match(self, chars):
        """"""
        start_index = self.next_index
        for char in self:
            if char not in chars:
                self.next_index -= 1
                break
        return self[start_index:self.next_index]
639448
@SuppressWarnings("unchecked")
    public static <T> T argThat(Matcher<T> matcher) {
        reportMatcher(matcher);
        return  (T) defaultValue(genericTypeOfMatcher(matcher.getClass()));
    }
851968
public char match(ISense source, ISense target) throws MatcherLibraryException {
        String sSynset = source.getGloss();
        String tSynset = target.getGloss();
        StringTokenizer stSource = new StringTokenizer(sSynset, " ,.\"'();");
        StringTokenizer stTarget = new StringTokenizer(tSynset, " ,.\"'();");
        String lemma;
        int counter = 0;
        while (stSource.hasMoreTokens()) {
            lemma = stSource.nextToken();
            if (!meaninglessWords.contains(lemma)) {
                List<String> lemmas = target.getLemmas();
                for (String lemmaToCompare : lemmas) {
                    if (lemma.equals(lemmaToCompare)) {
                        counter++;
                    }
                }
            }
        }
        if (counter >= threshold) {
            return IMappingElement.LESS_GENERAL;
        }

        while (stTarget.hasMoreTokens()) {
            lemma = stTarget.nextToken();
            if (!meaninglessWords.contains(lemma)) {
                List<String> lemmas = source.getLemmas();
                for (String lemmaToCompare : lemmas) {
                    if (lemma.equals(lemmaToCompare)) {
                        counter++;
                    }
                }
            }
        }
        if (counter >= threshold) {
            return IMappingElement.MORE_GENERAL;
        }
        return IMappingElement.IDK;
    }
615991
public Splitter trim(char c) {
    Matcher matcher = new CharMatcher(c);
    return new Splitter(pairSeparator, keyValueSeparator, matcher, matcher);
  }
793118
public static NotLike notLike(Expression<String> left, Expression<String> right, char wildCardCharacter) {
        return new NotLike(left, right, wildCardCharacter);
    }
664467
boolean matches(final char[] value, final int from) {

        // Check the bounds
        final int len = myCharacters.length;
        if (len + from > value.length || from < 0) {
            return false;
        }

        // Bounds are ok, check all characters.
        // Allow question marks to match any character
        for (int i = 0; i < len; i++) {
            if (myCharacters[i] != value[i + from] && myCharacters[i] != '?') {
                return false;
            }
        }

        // All characters match
        return true;
    }
693385
public static PatternMatcher compile(String pattern) {
    String p = pattern;
    boolean ignoreCase = false;
    if (p.startsWith("(?i)")) {
      ignoreCase = true;
      p = pattern.substring(4);
    }
    if (p.length() > 0) {
      p = "^.*(" + p + ").*$";
    }
    Parser parser = new Parser(PatternUtils.expandEscapedChars(p));
    Matcher m = Optimizer.optimize(parser.parse());
    return ignoreCase ? m.ignoreCase() : m;
  }
1157172
static Matcher convertSingleCharClassToSeq(Matcher matcher) {
    if (matcher instanceof CharClassMatcher) {
      Optional<Character> opt = matcher.<CharClassMatcher>as().set().character();
      if (opt.isPresent()) {
        return new CharSeqMatcher(opt.get());
      }
    }
    return matcher;
  }
926948
public static boolean hasCharset(String ctype)
    {
        if (ctype == null)
        {
            return false;
        }
        Matcher matcher = CHARSET_PATT.matcher(ctype);
        if (matcher.find())
        {
            return true;
        }
        else
        {
            return false;
        }
    }
234929
public static Iterator<Character> notExistChars(String s) {
    return new Iterator<Character>() {
      IntList collect = IntList.create(s.chars().distinct().sorted().toArray());
      int current = 128;
      Character next = null;

      @Override
      public Character next() {
        if (calcNext()) {
          Character c = next;
          next = null;
          return c;
        } else {
          throw new NoSuchElementException("No next non-exist character.");
        }
      }

      @Override
      public boolean hasNext() {
        return calcNext();
      }

      private boolean calcNext() {
        if (next == null) {
          while (++current < Integer.MAX_VALUE) {
            if (collect.remove(current) == false) {
              next = (char) current;
              return true;
            }
          }
          return false;
        }
        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());
    }
854511
protected static StringBuilder negate( StringBuilder value ) {
        for (int i = 0, len = value.length(); i != len; ++i) {
            char c = value.charAt(i);
            if (c == ' ' || c == '-') continue;
            value.setCharAt(i, (char)('9' - c + '0'));
        }
        return value;
    }