Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Dylan Bouchard   on Aug 20 In Java Category.

  
Question Answered By: Hoor Khan   on Aug 20

java.sun.com/.../String.html#trim()

If question is about, what trim( ) does, trim( ) returns a copy of the
string, with leading and trailing whitespace omitted.

Please note trim( ) removes leading and trailing spaces only, not spaces
which are in mid of some letters.

For eg:

str = " s t r ";

str.trim() retruns "s t r" means  it does not removes spaces in between
any letters.

Share: 

 

This Question has 5 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on .trim Or get search suggestion and latest updates.


Tagged: