Because a casual glance at the String API (in this case) tells you what
standard capabilities are available for (in this case) Strings. Since you
want to trim a string, and you're apparently unaware that Java has a method
called (conveniently) trim(), browsing the API might provide reference to a
method called (conveniently) trim(), which would not only answer your
immediate question (to wit: "How can I trim the string in Java?" - sic) but
future questions about Strings, and further than that, it sets up a useful
(for everybody) habit on your side, meaning that you learn to read docs on
your own and only raise questions that are truly above "bare beginner level"
questions, Sufi.

---------------------------------------------------
Joseph B. Ottinger               [EMAIL PROTECTED]
http://adjacency.org                  IT Consultant



>From: s i m o n <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
>reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: How can I trim the string in Java ???
>Date: Tue, 25 Sep 2001 13:52:18 +0800
>
>i'm fairly new here. what is a can the java api help me solve such problems
>with documentation?
>
>James
>----- Original Message -----
>From: Rajinder Sandhu <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: 25 September, 2001 12:32 PM
>Subject: Re: How can I trim the string in Java ???
>
>
> > why dont u download java API.
> > it will save u a lot of time. You can always refer that for such
>problems.
> >
> > anyway,
> >
> >         String str = " Dick ";
> >         str = str.trim(); file://this will remove the blank spaces
>before
>and
> > after Dick
> >
> > Cheers!!
> > Raj
> >
> > -----Original Message-----
> > From: Dick Wong [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, September 25, 2001 10:10 AM
> > To: [EMAIL PROTECTED]
> > Subject: How can I trim the string in Java ???
> >
> >
> > Same as subject.
> >
> >
>===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> > DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
> >
>===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to