| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Capitalization
is a Zeus utility class that provides
for converting lowercase letters to uppercase ones, uppercase ones
to lowercase ones, and more generally, converting Java
String
s from an unknown format to initial caps (where
only the first letter is capitalized), making a suitable class or
variable name.
Method Summary | |
static String | allLower(String original) This will take a String with unknown capitalization,
and convert all the letters to lowercase letters. |
static String | allUpper(String original) This will take a String with unknown capitalization,
and convert all the letters to uppercase letters. |
static String | initialLower(String original) This will take a String with unknown capitalization,
and convert the first letter to a lowercase letter, while leaving
all other letters the same. |
static String | initialUpper(String original) This will take a String with unknown capitalization,
and convert the first letter to a capital letter, while leaving
all other letters the same. |
static String | justInitialUpper(String original) This will take a String with unknown capitalization,
and convert the first letter to a capital letter, while converting
all other letters to lowercase. |
Method Detail |
public static String allLower(String original)
This will take a String
with unknown capitalization,
and convert all the letters to lowercase letters.
Note that if you want just the first
letter converted to lowercase, then
initialLower(java.lang.String)
should be used.
And for all you geniuses out there, yes, I know that
toLowerCase()
can be used directly; but
placing the code within this method allows this class
to be uniformly used for all capitalization purposes.
String
to convert.String
- the converted String
.public static String allUpper(String original)
This will take a String
with unknown capitalization,
and convert all the letters to uppercase letters.
Note that if you want just the first
letter converted to lowercase, then
initialUpper(java.lang.String)
should be used.
And for all you geniuses out there, yes, I know that
toUpperCase()
can be used directly; but
placing the code within this method allows this class
to be uniformly used for all capitalization purposes.
String
to convert.String
- the converted String
.public static String initialLower(String original)
This will take a String
with unknown capitalization,
and convert the first letter to a lowercase letter, while leaving
all other letters the same. Note that if you want the rest of
the letters converted to lowercase, then
allLower(java.lang.String)
should be used.
String
to convert.String
- the converted String
.public static String initialUpper(String original)
This will take a String
with unknown capitalization,
and convert the first letter to a capital letter, while leaving
all other letters the same. Note that if you want the rest of
the letters converted to lowercase, then
justInitialUpper(java.lang.String)
should be used.
String
to convert.String
- the converted String
.public static String justInitialUpper(String original)
This will take a String
with unknown capitalization,
and convert the first letter to a capital letter, while converting
all other letters to lowercase. Note that if you want the rest of
the letters left alone, then
initialUpper(java.lang.String)
should be used.
String
to convert.String
- the converted String
.
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |