ponderToolkit.editor.search
Interface SearchMatcher
- All Known Implementing Classes:
- BoyerMooreSearchMatcher, RESearchMatcher
- public interface SearchMatcher
An abstract interface for matching strings.
|
Method Summary |
int[] |
nextMatch(java.lang.String text)
Returns the offset of the first match of the specified text
within this matcher. |
java.lang.String |
substitute(java.lang.String text)
Returns the specified text, with any substitution specified
within this matcher performed. |
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
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- Returns:
- Null if no matches were found, or the changed string