|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.htmlunit.util.StringUtils
public final class StringUtils
String utilities class for utility functions not covered by third party libraries.
Method Summary | |
---|---|
static boolean |
containsCaseInsensitive(java.util.List<java.lang.String> strings,
java.lang.String string)
Returns true if the specified list of strings contains the specified string, ignoring case. |
static boolean |
containsWhitespace(java.lang.String s)
Returns true if the specified string contains whitespace, false otherwise. |
static java.lang.String |
escapeXmlChars(java.lang.String s)
Escapes the characters '<', '>' and '&' into their XML entity equivalents. |
static int |
indexOf(java.lang.String s,
char searchChar,
int beginIndex,
int endIndex)
Returns the index within a given string of the first occurrence of the specified search character. |
static boolean |
isFloat(java.lang.String s,
boolean trim)
Returns true if the specified string is a valid float, possibly triming the string before checking. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String escapeXmlChars(java.lang.String s)
StringEscapeUtils.escapeXml(String)
or
StringEscapeUtils.escapeHtml(String)
because those methods
escape some unicode characters as well.
s
- the string to escape
public static boolean containsWhitespace(java.lang.String s)
s
- the string to check for whitespace
public static int indexOf(java.lang.String s, char searchChar, int beginIndex, int endIndex)
s
- a string.searchChar
- a search character.beginIndex
- the index to start the search from.endIndex
- the index to stop the search.
public static boolean isFloat(java.lang.String s, boolean trim)
s
- the string to checktrim
- whether or not to trim the string before checking
public static boolean containsCaseInsensitive(java.util.List<java.lang.String> strings, java.lang.String string)
strings
- the strings to searchstring
- the string to search for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |