public class StringToolkit extends Object
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOGGER |
Modifier and Type | Method and Description |
---|---|
static LineSearchingResult |
findCompleteOccurrenceOrPartialEndingOccurrence(String primer,
String fixedPart,
int beginIndex)
This function finds out if a specified string contains any complete occurrence of a target string,
or ends with the target's beginning.
|
static LineSearchingResult |
getIthIndexes(String content,
String string,
String endIndicator,
int i)
This method is to get the position of the i th (1st, 2nd, 3rd, or 4th...) element in a string content
|
public static LineSearchingResult getIthIndexes(String content, String string, String endIndicator, int i)
content
- the current string contentstring
- the searching regex patternendIndicator
- the ending searching regex patterni
- the i th element to be searched (1st, 2nd, 3rd, or 4th...)LineSearchingResult.LINE_SEARCH_MISS
object with wasFound() => false to state that the search failed.public static LineSearchingResult findCompleteOccurrenceOrPartialEndingOccurrence(String primer, String fixedPart, int beginIndex)
primer
- the content string we're searching.fixedPart
- the target string we're looking for.beginIndex
- offset at which we want to begin the searchLineSearchingResult.LINE_SEARCH_MISS
if the target was not found.Copyright © 2018-2019 Henix. All Rights Reserved.