aspose file tools
The moose likes Java in General and the fly likes Want to make String LowerCase where first char should remain UpperCase Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Want to make String LowerCase where first char should remain UpperCase" Watch "Want to make String LowerCase where first char should remain UpperCase" New topic
Author

Want to make String LowerCase where first char should remain UpperCase

vwab
Greenhorn

Joined: Apr 12, 2007
Posts: 1
Hi Friends let say
String aa="BATCHLOR";
I want this String in following format:

String bb="Batchlor";
Can anybody suggeset me how to do it
Jesper de Jong
Java Cowboy
Bartender

Joined: Aug 16, 2005
Posts: 12928
    
    3

Have a look at the API documentation of the String class. It contains a lot of methods that you could use to do this. Try something out yourself, it's not a difficult problem.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Remko Strating
Ranch Hand

Joined: Dec 28, 2006
Posts: 893
The following code will do that



Personally I think this is not a intermediate question.


Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
P Lavti
Ranch Hand

Joined: Mar 27, 2007
Posts: 65
I was just thinking, can it be done using String.format()?

I think no... but still am not sure as not worked much with Formatter


-P Lavti<br />SCJP 5.0 (88%)
Jesper de Jong
Java Cowboy
Bartender

Joined: Aug 16, 2005
Posts: 12928
    
    3

Originally posted by Remko Strating:
The following code will do that ...

Remko, did you read the message above the JavaRanch forum overview:

"We're all here to learn, so when responding to others, please focus on helping them discover their own solutions, instead of simply providing answers."

The OP would have learned more if you'd let him figure it out for himself - that's why I didn't give him the answer to this simple question, just a hint about where to look.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Want to make String LowerCase where first char should remain UpperCase
 
Similar Threads
String comparison question
String add null to begining
String conversion
How to save default text in notepad
mask cc number in log files from a string in the log file