学习笔记: JS字符串

MDNjs字符串常用的一些方法 判断一个字符串是否以某个字符串开头 str.indexOf(substr[, start]) => 返回 substr 在字符串 str 中首次出现的位置,从 start 位置开始查找,如果不存在,则返回 -1。start可以是任...