BlogBlog
首页
  • Vue
  • TypeScript
  • React
  • Angular
  • Node.js
  • 小程序
  • Flutter
  • 数据产品
  • 大数据

    • Hadoop
    • Hive
    • Spark
  • MySQL
  • Redis
  • Java
  • Python
  • Golang
GitHub
首页
  • Vue
  • TypeScript
  • React
  • Angular
  • Node.js
  • 小程序
  • Flutter
  • 数据产品
  • 大数据

    • Hadoop
    • Hive
    • Spark
  • MySQL
  • Redis
  • Java
  • Python
  • Golang
GitHub

string api

  1. length - string.length
  2. charAt - string.charAt(index)
  3. charCodeAt - string.charCodeAt(index)
  4. concat - string.concat(string1, string2, ..., stringX)
  5. indexOf - string.indexOf(searchValue, fromIndex)
  6. lastIndexOf - string.lastIndexOf(searchValue, fromIndex)
  7. match - string.match(regexp)
  8. replace - string.replace(searchValue, replaceValue)
  9. search - string.search(regexp)
  10. slice - string.slice(start, end)
  11. substring - string.substring(start, end)
  12. split - string.split(separator, limit)
  13. includes - string.includes(searchValue, start)
  14. startsWith - string.startsWith(searchString, position)
  15. endsWith - string.endsWith(searchString, length)
  16. toUpperCase - string.toUpperCase()
  17. toLowerCase - string.toLowerCase()
  18. trim - string.trim()
  19. trimStart - string.trimStart()
  20. trimEnd - string.trimEnd()
  21. padStart - string.padStart(targetLength, padString)
  22. padEnd - string.padEnd(targetLength, padString)
  23. 模版字面量 - ${expression}
  24. replace - string.replace(searchValue, replaceValue)
  25. replaceAll - string.replaceAll(searchValue, replaceValue)
最近更新:: 2025/4/17 16:24
Contributors: alice