接口 Finder
-
- 所有已知实现类:
CharFinder,CharMatcherFinder,LengthFinder,PatternFinder,StrFinder,TextFinder
public interface Finder字符串查找接口,通过调用start(int)查找开始位置,再调用end(int)找结束位置
-
-
字段详细资料
-
INDEX_NOT_FOUND
static final int INDEX_NOT_FOUND
- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
start
int start(int from)
返回开始位置,即起始字符位置(包含),未找到返回-1- 参数:
from- 查找的开始位置(包含)- 返回:
- 起始字符位置,未找到返回-1
-
end
int end(int start)
返回结束位置,即最后一个字符后的位置(不包含)- 参数:
start- 找到的起始位置- 返回:
- 结束位置,未找到返回-1
-
reset
default Finder reset()
复位查找器,用于重用对象- 返回:
- this
-
-