Java String Quote quote(String text)

Here you can find the source of quote(String text)

Description

quote

License

Open Source License

Declaration

public static String quote(String text) 

Method Source Code

//package com.java2s;

public class Main {
    private static final char SINGLE_QUOTE = '\'';

    public static String quote(String text) {
        StringBuffer buffer = new StringBuffer();
        buffer.append(SINGLE_QUOTE);//from  w  ww  .j a  v  a2s . c om
        buffer.append(text);
        buffer.append(SINGLE_QUOTE);
        return buffer.toString();
    }
}

Related

  1. quote(String string)
  2. quote(String string, boolean escapeHtml)
  3. quote(String string, String charsToQuote)
  4. quote(String string, StringBuilder w)
  5. quote(String tableName)
  6. quote(String text)
  7. quote(String text)
  8. quote(String text)
  9. quote(String text)