string api
- length - string.length
- charAt - string.charAt(index)
- charCodeAt - string.charCodeAt(index)
- concat - string.concat(string1, string2, ..., stringX)
- indexOf - string.indexOf(searchValue, fromIndex)
- lastIndexOf - string.lastIndexOf(searchValue, fromIndex)
- match - string.match(regexp)
- replace - string.replace(searchValue, replaceValue)
- search - string.search(regexp)
- slice - string.slice(start, end)
- substring - string.substring(start, end)
- split - string.split(separator, limit)
- includes - string.includes(searchValue, start)
- startsWith - string.startsWith(searchString, position)
- endsWith - string.endsWith(searchString, length)
- toUpperCase - string.toUpperCase()
- toLowerCase - string.toLowerCase()
- trim - string.trim()
- trimStart - string.trimStart()
- trimEnd - string.trimEnd()
- padStart - string.padStart(targetLength, padString)
- padEnd - string.padEnd(targetLength, padString)
- 模版字面量 -
${expression}
- replace - string.replace(searchValue, replaceValue)
- replaceAll - string.replaceAll(searchValue, replaceValue)