Java SQL Unescape unescapeSQL(String input)

Here you can find the source of unescapeSQL(String input)

Description

unescape SQL

License

Open Source License

Declaration

static String unescapeSQL(String input) 

Method Source Code

//package com.java2s;

public class Main {
    static String unescapeSQL(String input) {
        // If the string is quoted
        if (input.startsWith("\"") && input.endsWith("\"")) {
            input = input.substring(1, input.length() - 1);
        }/*from   ww w. j a  v  a2s. co m*/
        return input.replace("\"\"", "\"").replace("\\\\", "\\");
    }
}

Related

  1. unescapeMySQLString(String s)
  2. unescapeSQLString(String b)
  3. unescapeSQLString(String b)
  4. unescapeSqlString(String input)
  5. unescapeSQLString(String str, String delim)