RE: wait, nevermind
RE: wait, nevermind
- Subject: RE: wait, nevermind
- From: "Pierre Bernard" <email@hidden>
- Date: Thu, 23 Oct 2003 09:40:20 +0200
- Thread-topic: wait, nevermind
One more for the road:
if ((string != null) && (string.length() > 0))
{
char[] chars = string.toCharArray();
chars[0] = Character.toUpperCase(chars[0]);
return new String(chars);
}
else
{
return string;
}
Pierre
--
Got a hang for movies?
http://homepage.mac.com/I_love_my/movies.html
-----Original Message-----
From: Robert A. Decker [mailto:email@hidden]
Sent: Thursday, October 23, 2003 12:07 AM
To: Web Objects Developer; email@hidden
Subject: wait, nevermind
I guess it probably doesn't get any simpler or efficient than:
static public String capitalizeFirstLetter (String value) {
String firstLetter = value.substring(0,1).toUpperCase();
String restLetters = value.substring(1);
return firstLetter + restLetters;
}
thanks,
Robert A. Decker
http://www.robdecker.com/
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
**********************************************************************
This email and any files transmitted with it are intended solely for
the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the sender
of this message. (email@hidden)
This email message has been checked for the presence of computer
viruses; however this protection does not ensure this message is
virus free.
Banque centrale du Luxembourg; Tel ++352-4774-1; http://www.bcl.lu
**********************************************************************
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.