my dog learned polymorphism
The moose likes Java in General and the fly likes trim () Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "trim ()" Watch "trim ()" New topic

trim ()

Frank Jacobsen
Ranch Hand

Joined: May 17, 2002
Posts: 358
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 ???

Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
See this thread..

Do try the "search" function on JavaRanch. Searching for "trailing whitespace" finds the above, no problem.

Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
I agree. Here's the link:
subject: trim ()
It's not a secret anymore!