MCPcopy
hub / github.com/google/guava / retainFrom

Method retainFrom

guava/src/com/google/common/base/CharMatcher.java:657–659  ·  view source on GitHub ↗

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

(CharSequence sequence)

Source from the content-addressed store, hash-verified

655 * ... returns {@code "aaa"}.
656 */
657 public String retainFrom(CharSequence sequence) {
658 return negate().removeFrom(sequence);
659 }
660
661 /**
662 * Returns a string copy of the input character sequence, with each matching BMP character

Callers 2

validatePartMethod · 0.45
testRetainFromMethod · 0.45

Calls 2

negateMethod · 0.95
removeFromMethod · 0.45

Tested by 1

testRetainFromMethod · 0.36