+ 1
String.trim() function
what the trim function actually does ?? I'm new to java someone explain please
2 Antworten
+ 4
If you have spaces before and/or after the string, this function will remove them.
this string... - " Do I have spaces before and after me? "
... will become - "Do I have spaces before and after me?"
+ 2
It gets rids of spaces before and after the string (leading and trailing). It returns the new string.