The commons-lang version also has a more robust and efficient 
implementation.

On Sat, 18 Jan 2003, robert burrell donkin wrote:

> just FYI
> 
> jakarta-commons-lang (http://jakarta.apache.org/commons/lang.html) has an 
> extended version of StringUtils that you might like to look at. i think 
> that it's uncapitalize method should do what you want.
> 
> - robert
> 
> On Friday, January 17, 2003, at 05:56 PM, O'Reilly John wrote:
> 
> > Hi,
> >
> > Would it be possible to add a new method (uncapitalizeFirstLetter) to
> > org/apache/velocity/utils/StringUtils.java - source included below.  This 
> > is
> > required when referring to java beans in a jsp file e.g. getting from
> > 'UserInfo' to 'userInfo'.
> >
> > John
> >
> >
> >     /**
> >      * <p>
> >      * un-Capitalize the first letter but leave the rest as they are.
> >      * </p>
> >      *
> >      * <p>
> >      *  For example <code>fooBar</code> becomes <code>FooBar</code>.
> >      * </p>
> >      *
> >      * @param data uncapitalize this
> >      * @return String
> >      */
> >     static public String uncapitalizeFirstLetter ( String data )
> >     {
> >         String firstLetter = data.substring(0,1).toLowerCase();
> >         String restLetters = data.substring(1);
> >         return firstLetter + restLetters;
> >     }
> >
> >
> > ************************************************************************
> > This e-mail and any files transmitted with it are confidential and may be
> > privileged and are intended solely for the individual named/ for the use 
> > of
> > the individual or entity to whom they are addressed.If you are not the
> > intended addressee, you should not disseminate, distribute or copy this
> > e-mail.Please notify the sender immediately if you have received this 
> > e-mail
> > by mistake and delete this e-mail from your system.If you are not the
> > intended recipient, you are notified that reviewing, disclosing, copying,
> > distributing or taking any action in reliance on the contents of this 
> > e-mail
> > is strictly prohibited.Please note that any views or opinions expressed in
> > this e-mail are solely those of the author and do not necessarily 
> > represent
> > those of Traventec Limited.E-mail transmission cannot be guaranteed to be
> > secure or error-free as information could be intercepted, corrupted, lost,
> > destroyed, or arrive late or incomplete.Traventec Limited therefore does 
> > not
> > accept liability for any errors or omissions in the contents of this
> > message, which arise as a result of e-mail transmission.The recipient 
> > should
> > check this e-mail and any attachments for the presence of viruses.This
> > e-mail has been swept for computer viruses however Traventec Limited 
> > accepts
> > no liability for any damage caused by any virus transmitted by this 
> > e-mail.
> >
> > --
> > To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED].
> > org>
> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED].
> > org>
> >
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to