public class StringSearcher extends Object
| Constructor and Description |
|---|
StringSearcher(String pattern)
Create a searcher for the given pattern
|
StringSearcher(String pattern,
boolean acceptWildcard,
boolean caseSensitive)
Create a searcher for the given pattern
|
| Modifier and Type | Method and Description |
|---|---|
int |
searchOnString(String toSearch)
Searches the given string and returns the first occurrence of pattern on it.
|
public StringSearcher(String pattern)
pattern - substring to searchpublic StringSearcher(String pattern, boolean acceptWildcard, boolean caseSensitive)
pattern - substring to searchacceptWildcard - If true, the pattern can contains wildcards.caseSensitive - If true, the searches will be case sensitivepublic int searchOnString(String toSearch)
toSearch - string to search.Copyright © 2015. All rights reserved.