Skip to content

Instantly share code, notes, and snippets.

@TheGreatJoules
Created October 21, 2023 21:16
Show Gist options
  • Save TheGreatJoules/68f2b7365947274ebac583686d333a53 to your computer and use it in GitHub Desktop.
Save TheGreatJoules/68f2b7365947274ebac583686d333a53 to your computer and use it in GitHub Desktop.
[Java/StringStreamFilter] Simple string filter
String str = s.chars()
.mapToObj(i -> (char) i)
.filter(Character::isLetter)
.map(String::valueOf)
.collect(Collectors.joining());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment