java.lang.Object | +--com.tinnef.util.StringUtilities
This class contains a number of static methods that are useful for manipulating Strings.
Constructor Summary | |
StringUtilities()
|
Method Summary | |
static java.lang.String |
asURL(java.lang.String s)
Return a String for use in an URL. |
static java.lang.String |
escapeDoubleQuotesAndSlashes(java.lang.String s)
Escape " or \ characters with \ in string S. |
static int |
occurencesOf(java.lang.String target,
java.lang.String searchString)
Return the number of occurences of searchString in target |
static java.lang.String |
removeChars(java.lang.String target,
java.lang.String characters)
Return a new string that is the result of removing every character in the string characters from the target string |
static java.lang.String |
replace(java.lang.String target,
java.lang.String searchString,
java.lang.String replaceString)
Create and return a new String by replacing searchString with replaceString in target |
static java.lang.String |
sentenceCaps(java.lang.String s)
Return a new String with the first word in every sentence capitalized. |
static java.lang.String |
wordCaps(java.lang.String s)
Return a new String with every word capitalized. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StringUtilities()
Method Detail |
public static java.lang.String asURL(java.lang.String s)
public static java.lang.String escapeDoubleQuotesAndSlashes(java.lang.String s)
public static int occurencesOf(java.lang.String target, java.lang.String searchString)
public static java.lang.String removeChars(java.lang.String target, java.lang.String characters)
public static java.lang.String replace(java.lang.String target, java.lang.String searchString, java.lang.String replaceString)
public static java.lang.String sentenceCaps(java.lang.String s)
public static java.lang.String wordCaps(java.lang.String s)