Skip to content

Instantly share code, notes, and snippets.

@hanbzu
Created October 28, 2013 12:25
Show Gist options
  • Save hanbzu/7195956 to your computer and use it in GitHub Desktop.
Save hanbzu/7195956 to your computer and use it in GitHub Desktop.
Java: Remove whitespace
// Remove all whitespace from String
"This is a string".replaceAll("\\s+","")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment