Java String Quote quote(String text)

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

Description

quote

License

Apache License

Declaration

public static String quote(String text) 

Method Source Code

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

public class Main {
    public static String quote(String text) {
        return "\"" + text + "\"";
    }//  ww  w  . j a  v  a  2  s.c  o m

    public static String quote(Object object) {
        return quote(nullSafeToString(object));
    }

    public static String nullSafeToString(Object object) {
        if (object == null) {
            return null;
        }
        return object.toString();
    }
}

Related

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