I have a Java string that contains supplementary characters (characters in the Unicode standard whose code points are above U+FFFF). These characters could for example be emojis. I want to remove those characters from the string, i.e. replace them with the empty string "".
- How do I remove supplementary characters from a string?
- How do I remove characters from an arbitrary code point range? (For example all characters in the range 1F000–1FFFF)?