Is there a convenience method to strip any leading or trailing spaces from a Java String? Something like: Result: myString.replace(” “,””) would replace the space between keep and this. Answer You can try the trim() method. Take a look at javadocs
Is there a convenience method to strip any leading or trailing spaces from a Java String? Something like: Result: myString.replace(” “,””) would replace the space between keep and this. Answer You can try the trim() method. Take a look at javadocs