public class StrFinder extends TextFinder
endIndex, negative, textINDEX_NOT_FOUND| Constructor and Description |
|---|
StrFinder(CharSequence strToFind,
boolean caseInsensitive)
构造
|
| Modifier and Type | Method and Description |
|---|---|
int |
end(int start)
返回结束位置,即最后一个字符后的位置(不包含)
|
static StrFinder |
of(CharSequence strToFind,
boolean caseInsensitive)
创建查找器,构造后须调用
TextFinder.setText(CharSequence) 设置被查找的文本 |
int |
start(int from)
返回开始位置,即起始字符位置(包含),未找到返回-1
|
getValidEndIndex, setEndIndex, setNegative, setTextpublic StrFinder(CharSequence strToFind, boolean caseInsensitive)
strToFind - 查找的字符串caseInsensitive - 是否忽略大小写public static StrFinder of(CharSequence strToFind, boolean caseInsensitive)
TextFinder.setText(CharSequence) 设置被查找的文本strToFind - 查找的字符串caseInsensitive - 是否忽略大小写StrFinderpublic int start(int from)
Finderfrom - 查找的开始位置(包含)public int end(int start)
Finderstart - 找到的起始位置Copyright © 2025. All rights reserved.