动态字符
属性
- 长度:
length()
方法
- 增
- 拼接:
concat() - 填充:
padStart()/padEnd()
- 拼接:
- 删
- 去白:
trim()/trimStart()/trimEnd()
- 去白:
- 改
- 大小:
toLowerCase()/toUpperCase() - 切片:
slice(m,n)
- 大小:
- 查
- 正则:
match()search(regexp)- 返回匹配片段的索引,如果没有匹配,则返回-1
- 分隔:
split() - 首位:
startWith()/endWith()
- 正则: