|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindprod.common15.StringSearch
public class StringSearch
Methods for searching strings for multiple targets. Especially useful for screenscraping.
to seach for "apple", "pear" or "cherry" all in one go. Methods use ... notation only available in JDK 1.5+.
Constructor Summary | |
---|---|
StringSearch()
|
Method Summary | |
---|---|
static int |
indexOf(java.lang.String s,
int base,
java.lang.String... targets)
find first of a number of possible targets. |
static int |
indexOf(java.lang.String s,
java.lang.String... targets)
find first of a number of possible targets. |
static int |
indexOfEnd(java.lang.String s,
int base,
java.lang.String... targets)
find first of a number of possible targets |
static int |
indexOfEnd(java.lang.String s,
java.lang.String... targets)
find first of a number of possible targets |
static int |
lastIndexOf(java.lang.String s,
int base,
java.lang.String... targets)
find last of a number of possible targets, one closest to the end |
static int |
lastIndexOf(java.lang.String s,
java.lang.String... targets)
find last of a number of possible targets, one closest to the end |
static int |
lastIndexOfEnd(java.lang.String s,
int base,
java.lang.String... targets)
find last of a number of possible targets, one closest to the end |
static int |
lastIndexOfEnd(java.lang.String s,
java.lang.String... targets)
find last of a number of possible targets, one closest to the end |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringSearch()
Method Detail |
---|
public static int indexOf(java.lang.String s, java.lang.String... targets)
s
- String to search intargets
- multiple targets to search for
public static int indexOf(java.lang.String s, int base, java.lang.String... targets)
s
- String to search inbase
- offset where to start lookingtargets
- multiple targets to search for
public static int indexOfEnd(java.lang.String s, java.lang.String... targets)
s
- String to search intargets
- multiple targets to search for
public static int indexOfEnd(java.lang.String s, int base, java.lang.String... targets)
s
- String to search inbase
- offset where to start lookingtargets
- multiple targets to search for
public static int lastIndexOf(java.lang.String s, java.lang.String... targets)
s
- String to search intargets
- multiple targets to search for
public static int lastIndexOf(java.lang.String s, int base, java.lang.String... targets)
s
- String to search inbase
- offset where to start lookingtargets
- multiple targets to search for
public static int lastIndexOfEnd(java.lang.String s, java.lang.String... targets)
s
- String to search intargets
- multiple targets to search for
public static int lastIndexOfEnd(java.lang.String s, int base, java.lang.String... targets)
s
- String to search inbase
- offset where to start lookingtargets
- multiple targets to search for
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |