SyntaxFix
Write A Post
Hire A Developer
Questions
Use String.trim() method to get rid of whitespaces (spaces, new lines etc.) from the beginning and end of the string.
String.trim()
String trimmedString = myString.trim();