我有一个我想转换的字符串.
字符串是图像,内容是:Gone in 60 seconds
我需要的是以下内容:Gone_in_60_seconds
但是当我尝试:image = image.replace(" ","_");
结果是:Gone_in 60 seconds
所以只有第一个空格被替换.我如何将所有空格转换为下划线?
| 归档时间: |
|
| 查看次数: |
930 次 |
| 最近记录: |