per usual  "there is an advanced java list"

    Probably still the most efficient, due to few objects being created, is
to put the String to an array, walk it using Character.toUpperCase() for the
first char and every char following a space, put the array to a String.  If
you will do this often, make it a static method in a utility class.

    Alternatively, use java.util.StringTokenizer, append each token to a
StringBuffer, tracking the beginning index, use Character.toUpperCase(), at
end put StringBuffer to a String.


                                                Joe Sam


-----Original Message-----
From: Carlos Santos <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Saturday, August 07, 1999 1:05 PM
Subject: OT: String handling ?


>Simple question:
>
>How do i convert
>"one two three"
>into
>"One Two Three " ?
>
>What functions or properties are there to do this sort of thing ?
>
>Thanks.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to