我的github

string 类的 indexof() 方法和lastIndexOf()方法

区别:

indexOf()是从前往后找

lastIndexOf是从字符串末尾开始检索,检索到子字符,则返回子字符在字符串中的位置

posted on 2022-09-09 14:44  XiaoNiuFeiTian  阅读(3860)  评论(0编辑  收藏  举报