• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

trim ()

 
Frank Jacobsen
Ranch Hand
Posts: 358
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Returns a copy of the string, with leading and trailing whitespace omitted.

I only want to remove the trailing spaces, how do i do this as simple as possible ???

Frank
 
Peter Chase
Ranch Hand
Posts: 1970
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this thread..

Do try the "search" function on JavaRanch. Searching for "trailing whitespace" finds the above, no problem.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic