I have a string like this:
mysz = \"name=john age=13 year=2001\";
I want to remove the whitespaces in the string. I tried trim()
trim()
One way to handle String manipulations is StringUtils from Apache commons.
String withoutWhitespace = StringUtils.deleteWhitespace(whitespaces);
You can find it here. commons-lang includes lots more and is well supported.