|
-
Apr 14th, 2005, 04:12 PM
#1
Thread Starter
Junior Member
trim function
hi all
I am student and I have to make an exercise that requires to trim a StringBuffer. Is there any trim command i can use and if yes do i have to add some import or something?
thanks
Edit: I found a trim function for the String format but I am still searching for a StringBuffer one.
<Moderator added green check mark to the thread>
Last edited by NoteMe; Apr 15th, 2005 at 06:51 AM.
-
Apr 14th, 2005, 06:53 PM
#2
Frenzied Member
Re: trim function
Something like this:
Code:
StringBuffer sb = new StringBuffer();
sb.append(" Three begin spaces, two ending ");
System.out.println(sb.toString().trim());
-
Apr 14th, 2005, 07:22 PM
#3
Thread Starter
Junior Member
-
Apr 14th, 2005, 07:55 PM
#4
Frenzied Member
Re: trim function
 Originally Posted by lemenz70
thank you System_Error!
Your very welcome.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|