Java String Single Quote singleQuote(String data)

Here you can find the source of singleQuote(String data)

Description

Single quotes a string

License

Open Source License

Parameter

Parameter Description
data string to quote

Return

single quoted string

Declaration

public static String singleQuote(String data) 

Method Source Code

//package com.java2s;

public class Main {
    /**//from   w ww  . j  a va2 s .  c om
     * Single quotes a string
     *
     * @param data string to quote
     *
     * @return single quoted string
     */
    public static String singleQuote(String data) {
        return "\'" + data + "\'";
    }
}

Related

  1. singleQuote(final String text)
  2. singleQuote(final String value)
  3. singleQuote(Object thing)
  4. singleQuote(String input)
  5. singleQuote(String s)
  6. singleQuote(String text)
  7. singleQuotedString(String str)