要仅保留字符串的前100个字符,请使用substring:
s = s.substring(0,100)
Run Code Online (Sandbox Code Playgroud)
要搜索子字符串,请使用indexOf:
s.indexOf("#key")
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2463 次 |
| 最近记录: |