Java String Quote quote(final String s)

Here you can find the source of quote(final String s)

Description

quote

License

Common Public License

Declaration

public static String quote(final String s) 

Method Source Code

//package com.java2s;
/*/*from   w  w  w  .j a  v a2s.  co  m*/
 * @author Fabio Zadrozny
 * Created: June 2005
 * License: Common Public License v1.0
 */

public class Main {
    public static String quote(final String s) {
        if (s.startsWith("'")) {
            return s;
        }
        return "'" + s + "'";
    }
}

Related

  1. quote(CharSequence cs)
  2. quote(CharSequence str)
  3. quote(CharSequence value)
  4. quote(final CharSequence original)
  5. quote(final CharSequence phrase)
  6. quote(final String str)
  7. quote(final String str)
  8. quote(final String str)
  9. quote(final String sValue)