How to replace || (two pipes) from a string with | (one) pipe

后端 未结 5 1620
醉话见心
醉话见心 2021-01-15 00:24

I am getting response for some images in json format within this tag:

\"xmlImageIds\":\"57948916||57948917||57948918||57948919||57948920||57948921||57

5条回答
  •  醉话见心
    2021-01-15 00:40

        String pipe="pipes||";
        System.out.println("Old Pipe:::"+pipe);
        System.out.println("Updated Pipe:::"+pipe.replace("||", "|"));
    

提交回复
热议问题