1、在你的程序中引入hutool的jar包
2、定义一个String类型的字符串
3、在定义一个String类型的需要查找位置的字符串
4、int compare = StrUtil.indexOfIgnoreCase(str1, searchStr);//查找字符串所在的位置
5、运行程序得到字符所在的位置
时间:2024-10-15 20:44:39
1、在你的程序中引入hutool的jar包
2、定义一个String类型的字符串
3、在定义一个String类型的需要查找位置的字符串
4、int compare = StrUtil.indexOfIgnoreCase(str1, searchStr);//查找字符串所在的位置
5、运行程序得到字符所在的位置