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()
If you need to remove unbreakable spaces too, you can upgrade your code like this :
st.replaceAll("[\\s|\\u00A0]+", "");