string 类的 indexof() 方法和lastIndexOf()方法
区别:
indexOf()是从前往后找
lastIndexOf是从字符串末尾开始检索,检索到子字符,则返回子字符在字符串中的位置