|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.util.CharUtils
public class CharUtils
Some char utilities.
| Field Summary | |
|---|---|
protected static char[] |
toLowerCase
Return the lower case of a char. |
protected static char[] |
toUpperCase
Return the upper case of a char. |
| Constructor Summary | |
|---|---|
CharUtils()
|
|
| Method Summary | |
|---|---|
static boolean |
caseRoundTrip(char c)
Converts a character to lower case and then converts the lower case to uppercase. |
static java.lang.String |
decodeUnicode(java.lang.String input)
Method that traslates unicode escape sequences in an input string into appropriate unicode chars. |
static boolean |
isUncased(java.lang.String s)
A method to check whether a given string has the same all upper and all lower case forms. |
static boolean |
isUpper(char c)
Tests whether a given character is upper case. |
static void |
main(java.lang.String[] arg)
Tests the upper and lowercase |
static char |
toLowerCase(char c)
Lowercases a single character using our lower case array. |
static java.lang.String |
toLowerCase(java.lang.String s)
Lower cases a string, using our lower case array. |
static char |
toUpperCase(char c)
Upper cases a single character, using our upper case array. |
static java.lang.String |
toUpperCase(java.lang.String s)
Uppercases a string, using our upper case array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final char[] toLowerCase
protected static final char[] toUpperCase
| Constructor Detail |
|---|
public CharUtils()
| Method Detail |
|---|
public static java.lang.String toLowerCase(java.lang.String s)
s - The string that we wish to lowercase.
public static char toLowerCase(char c)
c - The character to lowercase.
public static java.lang.String toUpperCase(java.lang.String s)
s - The string to uppercase.
public static char toUpperCase(char c)
c - The character to upper case.
public static boolean isUpper(char c)
c - The character to test.
true if the character is upper case, false otherwisepublic static boolean isUncased(java.lang.String s)
s - The string to test.
true if the given string has identical upper and lower case forms.public static final java.lang.String decodeUnicode(java.lang.String input)
input - The input string to be translated.
public static boolean caseRoundTrip(char c)
c - The character.
true if the character survives the roundtrip,
false otherwise.
public static void main(java.lang.String[] arg)
throws java.lang.Exception
arg - Arguments
java.lang.Exception - If anything goes wrong.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||