Here you can find the source of quote(String string)
Parameter | Description |
---|---|
string | a parameter |
public static String quote(String string)
//package com.java2s; /**//from w w w. jav a 2 s . c o m * Aptana Studio * Copyright (c) 2005-2012 by Appcelerator, Inc. All Rights Reserved. * Licensed under the terms of the GNU Public License (GPL) v3 (with exceptions). * Please see the license.html included with this distribution for details. * Any modifications to this file must keep this entire header intact. */ public class Main { /** * Add single quotes around the given string. * * @param string * @return */ public static String quote(String string) { return string == null ? null : '\'' + string + '\''; } }