Java tutorial
//package com.java2s; public class Main { public static String replaceBackslashesWithSlashes(String repBS) { if (repBS != null) { int ind = -1; while ((ind = repBS.indexOf("\\")) != -1) { repBS = repBS.substring(0, ind) + "/" + repBS.substring(ind + 1); } } return repBS; } }