|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.aduna.text.StringUtil
public class StringUtil
Constructor Summary | |
---|---|
StringUtil()
|
Method Summary | |
---|---|
static void |
appendN(char c,
int n,
java.lang.StringBuilder sb)
Appends the specified character n times to the supplied StringBuilder. |
static java.lang.String |
concat(java.lang.String... strings)
Concatenate a number of Strings. |
static java.lang.String[] |
decodeArray(java.lang.String encodedArray)
Decodes a String generated by encodeArray. |
static java.lang.String |
deriveInitialText(java.lang.String text)
Derives the initial text from the supplied text. |
static java.lang.String |
encodeArray(java.lang.String[] array)
Encodes an array of Strings into a single String than can be decoded to the original array using the corresponding decode method. |
static java.lang.String |
getAllAfter(java.lang.String string,
char separatorChar)
Returns all text occurring after the specified separator character, or the entire string when the seperator char does not occur. |
static java.lang.String |
getAllBefore(java.lang.String string,
char separatorChar)
Returns all text occurring before the specified separator character, or the entire string when the seperator char does not occur. |
static java.lang.String |
gsub(java.lang.String olds,
java.lang.String news,
java.lang.String text)
Substitute String "old" by String "new" in String "text" everywhere. |
static boolean |
isGarbageText(java.lang.String text)
Titles shorter than MIN_TITLE_LENGTH and long titles that don't contain a single space character are considered to be garbage. |
static java.lang.String |
trimDoubleQuotes(java.lang.String text)
Removes the double quote from the start and end of the supplied string if it starts and ends with this character. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringUtil()
Method Detail |
---|
public static java.lang.String gsub(java.lang.String olds, java.lang.String news, java.lang.String text)
olds
- The String to be substituted.news
- The String is the new content.text
- The String in which the substitution is done.
public static java.lang.String getAllAfter(java.lang.String string, char separatorChar)
string
- The string of which the substring needs to be determined.separatorChar
- The character to look for.
public static java.lang.String getAllBefore(java.lang.String string, char separatorChar)
string
- The string of which the substring needs to be determined.separatorChar
- The character to look for.
public static java.lang.String encodeArray(java.lang.String[] array)
public static java.lang.String[] decodeArray(java.lang.String encodedArray)
public static java.lang.String deriveInitialText(java.lang.String text)
public static boolean isGarbageText(java.lang.String text)
public static void appendN(char c, int n, java.lang.StringBuilder sb)
c
- The character to append.n
- The number of times the character should be appended.sb
- The StringBuilder to append the character(s) to.public static java.lang.String trimDoubleQuotes(java.lang.String text)
text
- The string to remove the double quotes from.
public static java.lang.String concat(java.lang.String... strings)
strings
- the String to concatenate
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |