Java String Quote quoteMonetDbValue(String value)

Here you can find the source of quoteMonetDbValue(String value)

Description

Put escaped quotes around a value.

License

Apache License

Declaration

public static String quoteMonetDbValue(String value) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**//from  w ww.  j a va2s  .  co m
     * Put escaped quotes around a value.
     */
    public static String quoteMonetDbValue(String value) {
        return "'"
                + value.replaceAll("\\\\", "\\\\\\\\").replaceAll("'",
                        "\\\\'") + "'";
    }
}

Related

  1. quoteMdxIdentifier(String ident)
  2. quoteMe(String unquoted)
  3. quoteMeta(String s)
  4. quotemeta(String s)
  5. quoteMonetDbIdentifier(String ident)
  6. quoteNameIfNecessary(String name)
  7. quoteNcName(String ncName)
  8. quotEncode(String txt)
  9. quotEncode(String txt)