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

Method lastIndexIn

output/java_guava/1.4.19/CharMatcher.java:745–752  ·  view source on GitHub ↗

Returns the index of the last matching character in a character sequence, or -1 if no matching character is present. The default implementation iterates over the sequence in reverse order calling #matches for each character. @param sequence the character sequence to examine from

(CharSequence sequence)

Source from the content-addressed store, hash-verified

743
744
745 public int lastIndexIn(CharSequence sequence) {
746 for (int i = sequence.length() - 1; i >= 0; i--) {
747 if (matches(sequence.charAt(i))) {
748 return i;
749 }
750 }
751 return -1;
752 }
753
754 /**
755 * Returns the number of matching characters found in a character sequence.

Callers

nothing calls this directly

Calls 2

matchesMethod · 0.95
lengthMethod · 0.45

Tested by

no test coverage detected