public static class StringSearch.SimpleStringSearch extends StringSearch
Implement a simple string search algorithm using JDK String.indexOf algorithm
StringSearch.SimpleStringSearch| Constructor and Description |
|---|
SimpleStringSearch() |
| Modifier and Type | Method and Description |
|---|---|
int |
search(char[] text,
char[] target,
int from)
Search a char array in another char array with from index specified
|
apply, wrappublic int search(char[] text,
char[] target,
int from)
StringSearchSearch a char array in another char array with from index specified
search in class StringSearchtext - the char array to be searchedtarget - the pattern to be searched across the textfrom - the from index it shall be non-negative number. If from index is negative number then it starts from 0; if from is greater than or equals to the text length then -1 will be returned-1 is returnedCopyright © 2014–2019 OSGL (Open Source General Library). All rights reserved.