Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

make the First Character of the string Uppercase

Status
Not open for further replies.

papaboy2

MIS
Jan 28, 2003
52
0
0
PH
How can i make the First character of the string to Uppercase? thanks very much!
 
Basic usage

Code:
String text="hattusas";
text.substring(0,1).toUpperCase() + text.substring(1);
/*returns Hattusas*/

Extended Use
Code:
String text="hattusas;
return text.substring(0,1).toUpperCase(new java.util.Locale("TR","tr")) + text.substring(1);

Salih Sipahi
Software Engineer.
City of Istanbul Turkey
s.sipahi@sahinlerholding.com.tr
turkey_clr.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top