public class CharFinder extends TextFinder
endIndex, negative, text
INDEX_NOT_FOUND
Constructor and Description |
---|
CharFinder(char c)
构造,不忽略字符大小写
|
CharFinder(char c,
boolean caseInsensitive)
构造
|
Modifier and Type | Method and Description |
---|---|
int |
end(int start)
返回结束位置,即最后一个字符后的位置(不包含)
|
int |
start(int from)
返回开始位置,即起始字符位置(包含),未找到返回-1
|
getValidEndIndex, setEndIndex, setNegative, setText
public CharFinder(char c)
c
- 被查找的字符public CharFinder(char c, boolean caseInsensitive)
c
- 被查找的字符caseInsensitive
- 是否忽略大小写public int start(int from)
Finder
from
- 查找的开始位置(包含)public int end(int start)
Finder
start
- 找到的起始位置Copyright © 2024. All rights reserved.