org.jext.search
Class LiteralSearchMatcher
java.lang.Object
org.jext.search.LiteralSearchMatcher
- public class LiteralSearchMatcher
- extends java.lang.Object
Constructor Summary |
LiteralSearchMatcher(java.lang.String search,
java.lang.String replace,
boolean ignoreCase)
Creates a new string literal matcher. |
Method Summary |
int[] |
nextMatch(java.lang.String text)
Returns the offset of the first match of the specified text
within this matcher. |
int[] |
nextMatch(java.lang.String text,
int index)
|
java.lang.String |
substitute(java.lang.String text)
Returns the specified text, with any substitution specified
within this matcher performed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LiteralSearchMatcher
public LiteralSearchMatcher(java.lang.String search,
java.lang.String replace,
boolean ignoreCase)
- Creates a new string literal matcher.
- Parameters:
search
- The search stringreplace
- The replacement stringignoreCase
- True if the matcher should be case insensitive,
false otherwise
nextMatch
public int[] nextMatch(java.lang.String text)
- Returns the offset of the first match of the specified text
within this matcher.
- Parameters:
text
- The text to search in
- Returns:
- an array where the first element is the start offset
of the match, and the second element is the end offset of
the match
nextMatch
public int[] nextMatch(java.lang.String text,
int index)
substitute
public java.lang.String substitute(java.lang.String text)
- Returns the specified text, with any substitution specified
within this matcher performed.
- Parameters:
text
- The text
Copyright ? 2002 Romain Guy.