String字符串截取\转为//

String sts = newStr;
        sts = newStr.replaceAll("//","\\\\\\\\");;
//两个斜杠在字符串中为1个\斜杠

 

posted @ 2019-09-24 17:12  闫超辉  阅读(625)  评论(0编辑  收藏  举报