|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.cassinidivision.core.cassinijava.StringHelper
A suite of handy String utilities.
| Constructor Summary | |
StringHelper()
|
|
| Method Summary | |
static String |
fixXHTML(String helpedString)
Fixes a batch of HTML from the mangling done by IE's DHTML environment, so that it will once again be valid XML. |
static int |
indexOfAnyString(String helpedString,
Vector strings,
int startIndex)
Search a string for various substrings and return the index of the first found. |
static String |
mostlyUniqueAlphanumericString()
Returns a unique string value according to the current hostname, IP address and some other factors (including random factors). |
static String |
stringByEscapingXMLCharactersInString(String helpedString)
Escape various XML special characters (including &, <, >, ' and "). |
static String |
stringFromStringByReplacingStringWithString(String helpedString,
String from,
String to)
Search and replace all instances of the "from" string in "helpedString" with the "to" string. |
static int |
stringIsEqualToStringUpToIndex(String string1,
String string2)
Compare two strings and return the index of the first character found where they differ. |
static String |
stringWithContentsOfFile(String path)
Read a file and return the contents as a string. |
static String |
substringBetweenStringAndString(String helpedString,
String from,
String to)
Returns the substring from the first instance of the "from" string and the next instance of the "to" string. |
static String |
substringUptoString(String helpedString,
String marker)
Returns a substring of the given string up to (but not including) the marker string. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public StringHelper()
| Method Detail |
public static String mostlyUniqueAlphanumericString()
public static String substringBetweenStringAndString(String helpedString,
String from,
String to)
helpedString - The string from which to extract substrings.from - The beginning markerpoint.to - The end markerpoint.
public static String substringUptoString(String helpedString,
String marker)
helpedString - The string to examine.marker - The markerpoint.
public static String stringFromStringByReplacingStringWithString(String helpedString,
String from,
String to)
helpedString - The string for examination.from - The value of the original substring(s).to - The value for the replacement substring(s).
public static String stringByEscapingXMLCharactersInString(String helpedString)
helpedString - The string for examination.
public static int indexOfAnyString(String helpedString,
Vector strings,
int startIndex)
helpedString - strings - startIndex -
public static String fixXHTML(String helpedString)
helpedString -
public static int stringIsEqualToStringUpToIndex(String string1,
String string2)
string1 - One string.string2 - Another string.
public static String stringWithContentsOfFile(String path)
throws IOException
path - The full pathname to the file.
IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||