Here you can find the source of quoteString(final String input)
Parameter | Description |
---|---|
input | string to edit |
Parameter | Description |
---|---|
IllegalArgumentException | if String is null |
public static String quoteString(final String input)
//package com.java2s; //License from project: Creative Commons License public class Main { /**/* w w w .j a v a2 s . c o m*/ * Surrounds a string with quotes. * @param input string to edit * @return a string surrounded with quotes * @throws IllegalArgumentException if String is null */ public static String quoteString(final String input) { if (input == null) throw new IllegalArgumentException("String cannot be null!"); return '"' + input + '"'; } }