现在我想吧"\"替换为"\\",应该怎么做啊!!replaceall尝试过不行,然后用的新类也不好用,求大神
 /**
  * 字符串替换函数
  * @param from 要替换的字符
  * @param to 要替换成的目标字符
  * @param source 要替换的字符串
  * @return 替换后的字符串
  */
 public static String replace(String strSource, String strFrom, String strTo) {    
    if (strSource == null) {        
      return null;    
    }  
    int i = 0;
    if ((i = strSource.indexOf(strFrom, i)) >= 0) {
      char[] cSrc = strSource.toCharArray();
      char[] cTo = strTo.toCharArray();
      int len = strFrom.length();  
      StringBuffer buf = new StringBuffer(cSrc.length);  
      buf.append(cSrc, 0, i).append(cTo);
      i += len;    
      int j = i;       
      while ((i = strSource.indexOf(strFrom, i)) > 0) {  
        buf.append(cSrc, j, i - j).append(cTo);   
        i += len;  
        j = i;        
      }        
      buf.append(cSrc, j, cSrc.length - j); 
      return buf.toString(); 
    } 
    return strSource;
  }java