Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to trim strings?  RSS feed

 
Mike Smith
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all, I was just informed that the solution to my problem is to trim my strings. My only question is how do I do that.Is there a command I can insert into java to do that . Thanks in advance.
 
Rick Portugal
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hope that helps. trim() trims leading and trailing whitespace. You can see all of the methods (like trim) that String has by looking at http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html . Good luck.
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scroll down this page a little; all will become clear.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!