//indexOf,chatAt,charCodeAt,substr,substring,concat
//search,replace,match,slice,split
//toLocaleLowerCase,toLocaleUpper,toLowerCase,toUpperCase
var str="Hello World";
console.log(str.indexOf('ll',2));//从第三个字符开始查找ll字符串,返回其索引或-1
console.log(str.charAt(7));//返回第八个字符:o
console.log(str.
2021-05-17 字符串数组常见15个API
最新推荐文章于 2023-04-14 21:36:33 发布
//indexOf,chatAt,charCodeAt,substr,substring,concat//search,replace,match,slice,split//toLocaleLowerCase,toLocaleUpper,toLowerCase,toUpperCasevar str="Hello World";console.log(str.indexOf('ll',2));//从第三个字符开始查找ll字符串,返回其索引或-1console.log(str.charAt(7));
摘要由CSDN通过智能技术生成