lastIndexOf相关知识

来源:互联网 发布:淘宝怎么用照片找同款 编辑:程序博客网 时间:2024/06/02 04:08

只定字符串出现的位置,0开始
System.out.println("abcde".lastIndexOf("c")); 输出2
System.out.println("abcdec".lastIndexOf("c")); 输出5