Here you can find the source of quoteString(String in)
Parameter | Description |
---|---|
in | string to be quoted. |
public static String quoteString(String in)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w ww .j ava2 s. c o m * Simple function to wrap quotes around a valid string. * * @param in string to be quoted. * @return quoted string (if input is not null). */ public static String quoteString(String in) { String ret = null; // assume failure if (in != null) { final String QUOTE = "\""; ret = QUOTE + in + QUOTE; } return ret; } }