Java String Unescape unescape(String input, char escapeChar)

Here you can find the source of unescape(String input, char escapeChar)

Description

unescape

License

Open Source License

Declaration

public static String unescape(String input, char escapeChar) 

Method Source Code

//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();

    }
}

Related

  1. unescape(String escaped)
  2. unescape(String escaped, char escape)
  3. unescape(String escapedMessage)
  4. unescape(String input)
  5. unescape(String input)
  6. unescape(String line)
  7. unescape(String line)
  8. unescape(String line, int start, int end)
  9. unescape(String literal, String escapedChars)