Here you can find the source of unescapeText(String s)
public static String unescapeText(String s)
//package com.java2s; public class Main { public static String unescapeText(String s) { StringBuffer text = new StringBuffer(s); boolean more = true; while (more) { // if JDK 1.4, swap the following for a performance increase. //int i = text.indexOf( "\\\"" ); // 1.4 only int i = text.toString().indexOf("\\\""); // 1.3 only if (i != -1) { text.replace(i, i + 2, "\""); } else { more = false;// w w w . j a v a 2 s .c o m } } //System.out.println( "unescapeText() Converted |"+s+"| to |"+text.toString()+"|" ); return text.toString(); } }