public final String removeFrom ( String s ) { final StringBuilder sb = new StringBuilder ( ) ; for ( int offset = 0 ; offset < s . length ( ) ; ) { final int codePoint = s . codePointAt ( offset ) ; if ( ! matches ( codePoint ) ) { sb . appendCodePoint ( codePoint ) ; } offset += Character . charCount ( codePoint ) ; } return sb . toString ( ) ; }
Returns a copy of the input string with all Unicode codepoints matching this matcher removed