aspose file tools*
The moose likes Beginning Java and the fly likes String cases:Lower,upper etc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "String cases:Lower,upper etc" Watch "String cases:Lower,upper etc" New topic
Author

String cases:Lower,upper etc

Baseet Ahmed
Ranch Hand

Joined: Dec 18, 2006
Posts: 224
Salaam/Hi,

My apologize if this post is not eligible for this area.
I would like to know the following:
As the String objects provide methods for converting strings into lower or upper case.Is there any method for converting strings in other cases like title,sentence and toggle cases etc. ?

If not, then would like to know that is there any possibility to add our own methods(custom-level) into Java's deafult package such as java.lang.
So that it becomes available to all java users to use those methods.

What you say ? Isn't good idea.

Regards
Baseet Ahmed
******************
Say Salaam before starting communication(verbal+nonverbal),even before Hi/Hello.
Salaam : Assalam Alekum (Peace may upon you.)
******************
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


Is there any method for converting strings in other cases like title,sentence and toggle cases etc. ?

No, there are no methods for this in the JDK.


If not, then would like to know that is there any possibility to add our own methods(custom-level) into Java's deafult package such as java.lang.
So that it becomes available to all java users to use those methods.

You can't add them to the JDK, but you could request they be added and see what Sun do. Or you could write your own and publish these via an open source resource like sourceforge.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

Apache Commons Lang has WordUtils.capitalize for capitalizing each word, and StringUtils.swapCase for toggling upper and lower case.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Baseet Ahmed
Ranch Hand

Joined: Dec 18, 2006
Posts: 224
Thank you.


Regards
Baseet Ahmed
******************
Say Salaam before starting communication(verbal+nonverbal),even before Hi/Hello.
Salaam : Assalam Alekum (Peace may upon you.)
******************
Rodrigo Lopes
Ranch Hand

Joined: Feb 29, 2008
Posts: 119
Well, since version 6, you can contribute on jdk.
Take a look at http://jdk.dev.java.net/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: String cases:Lower,upper etc