MCPcopy Create free account
hub / github.com/antlr/codebuff / countIn

Method countIn

output/java_guava/1.4.13/CharMatcher.java:757–765  ·  view source on GitHub ↗

Returns the number of matching characters found in a character sequence.

(CharSequence sequence)

Source from the content-addressed store, hash-verified

755
756
757 public int countIn(CharSequence sequence) {
758 int count = 0;
759 for (int i = 0; i < sequence.length(); i++) {
760 if (matches(sequence.charAt(i))) {
761 count++;
762 }
763 }
764 return count;
765 }
766
767 /**
768 * Returns a string containing all non-matching characters of a character sequence, in order. For

Callers 1

countInMethod · 0.45

Calls 2

matchesMethod · 0.95
lengthMethod · 0.45

Tested by

no test coverage detected