public class LiteralSearchMatcher
extends java.lang.Object
Constructor and Description |
---|
LiteralSearchMatcher(java.lang.String search,
java.lang.String replace,
boolean ignoreCase)
Creates a new string literal matcher.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public LiteralSearchMatcher(java.lang.String search, java.lang.String replace, boolean ignoreCase)
search
- The search stringreplace
- The replacement stringignoreCase
- True if the matcher should be case insensitive,
false otherwisepublic int[] nextMatch(java.lang.String text)
text
- The text to search inpublic int[] nextMatch(java.lang.String text, int index)
public java.lang.String substitute(java.lang.String text)
text
- The textCopyright ? 2002 Romain Guy.