Here you can find the source of unescape(String input, char escapeChar)
public static String unescape(String input, char escapeChar)
//package com.java2s; // This package is part of the Spiralcraft project and is licensed under public class Main { public static String unescape(String input, char escapeChar) { final StringBuilder out = new StringBuilder(); boolean escapeNext = false; for (char c : input.toCharArray()) { if (c == escapeChar && !escapeNext) { escapeNext = true;/*from ww w . j a v a 2 s.c o m*/ } else { out.append(c); escapeNext = false; } } return out.toString(); } }