|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.charlesames.utility.common.StringMethods
public abstract class StringMethods
Miscellaneous string-manipulation functions
| Constructor Summary | |
|---|---|
StringMethods()
|
|
| Method Summary | |
|---|---|
static byte[] |
ascii7BitFromString(java.lang.String text)
downgrades a string from unicode to 7-bit ASCII. |
static byte[] |
asciiFromString(java.lang.String text)
downgrades a string from unicode to 8-bit ASCII. |
static void |
checkName(java.lang.String name,
boolean allowSpaces,
boolean allowInitialDigit)
Check that the indicated name is a sequence of letters and digits. |
static boolean |
containsWhitespace(java.lang.String text)
Checks a string for whitespace. |
static boolean |
isNullOrBlank(java.lang.String arg0)
Checks if a string is blank, while accommodating a null argument. |
static java.lang.String |
padLeft(java.lang.String text,
int length)
Pad the indicated text with blanks on the left to obtain the indicated length. |
static java.lang.String |
padRight(java.lang.String text,
int length)
Pad the indicated text with blanks on the right to obtain the indicated length. |
static boolean |
stringEquals(java.lang.String arg0,
java.lang.String arg1)
Tests if two strings are equal, while accommodating null arguments. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringMethods()
| Method Detail |
|---|
public static boolean containsWhitespace(java.lang.String text)
text - The string to be checked.
public static boolean stringEquals(java.lang.String arg0,
java.lang.String arg1)
arg0 - A string.arg1 - A string.
public static boolean isNullOrBlank(java.lang.String arg0)
arg0 - A string.
public static byte[] ascii7BitFromString(java.lang.String text)
text - The unicode text.
public static byte[] asciiFromString(java.lang.String text)
text - The unicode text.
public static void checkName(java.lang.String name,
boolean allowSpaces,
boolean allowInitialDigit)
name - The indicated name.allowSpaces - True if spaces are allowed after the initial character; false otherwise.allowInitialDigit - False if name must start with letter; true otherwise.
public static java.lang.String padRight(java.lang.String text,
int length)
text - The indicated text.length - The indicated length.
public static java.lang.String padLeft(java.lang.String text,
int length)
text - The indicated text.length - The indicated length.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||