|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.metamatrix.core.util.StringUtilities
public class StringUtilities
This class contains static utilities that return strings that are the result of manipulating other strings or objects.
| Field Summary | |
|---|---|
static java.lang.String |
LINE_SEPARATOR
The String that should be used to separate lines; defaults to NEW_LINE |
static java.lang.String |
LINE_SEPARATOR_PROPERTY_NAME
The name of the System property that specifies the string that should be used to separate lines. |
static java.lang.String |
NEW_LINE
The String "\n" |
| Constructor Summary | |
|---|---|
StringUtilities()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
buildPath(java.lang.String prefix,
java.lang.String suffix)
Returns the path representing the concatenation of the specified path prefix and suffix. |
static java.lang.String |
condenseToLength(java.lang.String originalString,
int maxLength,
int endLength,
java.lang.String middleString)
|
static java.lang.String |
getLastUpperCharToken(java.lang.String value)
Returns a new string that represents the last fragment of the original string that begins with an uppercase char. |
static java.lang.String |
getLastUpperCharToken(java.lang.String value,
java.lang.String lastToken)
Returns a new string that represents the last fragment of the original string that begins with an uppercase char. |
static java.lang.String[] |
getLines(java.lang.String value)
|
static java.lang.String |
getLineSeparator()
|
static java.lang.String |
lowerCaseFirstChar(java.lang.String value)
Returns a new string that lowercases the first character in the passed in value String |
static java.lang.String |
removeChars(java.lang.String value,
char[] chars)
|
static java.lang.String |
removeExtraWhitespace(java.lang.String value)
Replaces multiple sequential "whitespace" characters from the specified string with a single space character, where whitespace includes \r\t\n and other characters |
static java.lang.String |
replaceWhitespace(java.lang.String value,
boolean stripExtras)
Replaces all "whitespace" characters from the specified string with space characters, where whitespace includes \r\t\n and other characters |
static java.lang.String |
replaceWhitespace(java.lang.String value,
java.lang.String replaceWith,
boolean stripExtras)
Replaces all "whitespace" characters from the specified string with space characters, where whitespace includes \r\t\n and other characters |
static java.lang.String |
upperCaseFirstChar(java.lang.String value)
Returns a new string that uppercases the first character in the passed in value String |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String NEW_LINE
public static final java.lang.String LINE_SEPARATOR_PROPERTY_NAME
public static final java.lang.String LINE_SEPARATOR
NEW_LINE
| Constructor Detail |
|---|
public StringUtilities()
| Method Detail |
|---|
public static java.lang.String getLineSeparator()
public static java.lang.String buildPath(java.lang.String prefix,
java.lang.String suffix)
prefix - The path prefixsuffix - The path suffix
public static java.lang.String lowerCaseFirstChar(java.lang.String value)
value -
public static java.lang.String upperCaseFirstChar(java.lang.String value)
value -
public static java.lang.String getLastUpperCharToken(java.lang.String value,
java.lang.String lastToken)
value - lastToken - - the last token tried... if not null will look
backwards from the last token instead of the end of the value param
public static java.lang.String getLastUpperCharToken(java.lang.String value)
value -
public static java.lang.String[] getLines(java.lang.String value)
public static java.lang.String removeChars(java.lang.String value,
char[] chars)
public static java.lang.String replaceWhitespace(java.lang.String value,
boolean stripExtras)
value - the string to work withstripExtras - if true, replace multiple whitespace characters with a single character.Pattern
public static java.lang.String replaceWhitespace(java.lang.String value,
java.lang.String replaceWith,
boolean stripExtras)
value - the string to work withreplaceWith - the character to replace withstripExtras - if true, replace multiple whitespace characters with a single character.Patternpublic static java.lang.String removeExtraWhitespace(java.lang.String value)
value - the string to work withPattern
public static java.lang.String condenseToLength(java.lang.String originalString,
int maxLength,
int endLength,
java.lang.String middleString)
originalString - maxLength - endLength - middleString -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||