Phùng Quang Phi
New member
How do you get rid of the whitespace at the end of a string?
Answer
String result =
str.
trim();
The trim() method will remove both leading and trailing whitespace from a string and return the result.
Answer
String result =
str.
trim();
The trim() method will remove both leading and trailing whitespace from a string and return the result.