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

Method retainFrom

corpus/java/training/guava/base/CharMatcher.java:732–734  ·  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

730 * ... returns {@code "aaa"}.
731 */
732 public String retainFrom(CharSequence sequence) {
733 return negate().removeFrom(sequence);
734 }
735
736 /**
737 * 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