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

Method countIn

output/java_guava/1.4.19/CharMatcher.java:759–767  ·  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

757
758
759 public int countIn(CharSequence sequence) {
760 int count = 0;
761 for (int i = 0; i < sequence.length(); i++) {
762 if (matches(sequence.charAt(i))) {
763 count++;
764 }
765 }
766 return count;
767 }
768
769 /**
770 * 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