Java String Quote quote(String text)

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

Description

Puts a String text in quotes.

License

LGPL

Parameter

Parameter Description
text The message to format.

Return

String The text with the quotes around it.

Declaration

public static String quote(String text) 

Method Source Code

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

public class Main {
    /**//from w  w w  . j ava  2 s. co  m
     * Puts a String text in quotes.
     *
     * @param text The message to format.
     *
     * @return String The text with the quotes around it.
     */
    public static String quote(String text) {

        return "\"" + text + "\"";
    }
}

Related

  1. quote(String string, StringBuilder w)
  2. quote(String tableName)
  3. quote(String text)
  4. quote(String text)
  5. quote(String text)
  6. quote(String text)
  7. quote(String text)
  8. quote(String text, String quote)
  9. quote(String toQuote, String specials, char quoteChar)