C:\Users\JYM\Desktop\FUNK_AWS data-2023.8.09.xls 把\替换成/
时间: 2023-08-26 21:06:19 浏览: 201
你可以使用字符串的replace()方法将"\\"替换为"/"。 在给定的文件路径中,你可以使用以下代码进行替换:
```
String filePath = "C:\\Users\\JYM\\Desktop\\FUNK_AWS data-2023.8.09.xls";
String replacedFilePath = filePath.replace("\\", "/");
```
这将把路径中的所有"\\"替换为"/",得到的替换后的文件路径为:"C:/Users/JYM/Desktop/FUNK_AWS data-2023.8.09.xls"。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [识别身份证中的籍贯、出生年月、性别-http://www.cnblogs.com/huxj/archive/2010/08/01/1789843.html转!...](https://blog.csdn.net/weixin_30267691/article/details/96886147)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [maven 加入json-lib.jar 报错 Missing artifact net.sf.json-lib:json-lib:jar:2.4:compile](https://blog.csdn.net/weixin_30483013/article/details/98393337)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文