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

Method retainFrom

output/java_guava/1.4.16/CharMatcher.java:817–819  ·  view source on GitHub ↗

Returns a string containing all matching characters of a character sequence, in order. For example: CharMatcher.is('a').retainFrom("bazaar") ... returns "aaa".

(CharSequence sequence)

Source from the content-addressed store, hash-verified

815
816
817 public String retainFrom(CharSequence sequence) {
818 return negate().removeFrom(sequence);
819 }
820
821 /**
822 * Returns a string copy of the input character sequence, with each character that matches this

Callers 1

validatePartMethod · 0.45

Calls 2

negateMethod · 0.95
removeFromMethod · 0.45

Tested by

no test coverage detected