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

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

区别:

indexOf()是从前往后找

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

猜你喜欢

转载自blog.csdn.net/m0_72297711/article/details/129110515