Java String Quote quoteMe(String unquoted)

Here you can find the source of quoteMe(String unquoted)

Description

quote Me

License

Open Source License

Declaration

private static String quoteMe(String unquoted) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static String quoteMe(String unquoted) {
        return "\""
                + unquoted.replaceAll("\"", "\"\"").replaceAll("\\\\",
                        "\\\\\\\\") + "\"";
    }/*w w  w.  j  a va2s. co  m*/
}

Related

  1. quoteJavaString(String s)
  2. quoteJsonLib(String string)
  3. quoteLiteralAsRegexp(String text)
  4. quoteLocation(String location)
  5. quoteMdxIdentifier(String ident)
  6. quoteMeta(String s)
  7. quotemeta(String s)
  8. quoteMonetDbIdentifier(String ident)
  9. quoteMonetDbValue(String value)