Here you can find the source of quoteString(String quoted, String quoteFlag)
public static String quoteString(String quoted, String quoteFlag)
//package com.java2s; /******************************************************************************* * Copyright (c) 2005 Actuate Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*from ww w . java2s . c om*/ * Actuate Corporation - initial API and implementation *******************************************************************************/ public class Main { public static String quoteString(String quoted, String quoteFlag) { assert quoteFlag != null; if (quoted == null) { return ""; } else { return quoteFlag + quoted + quoteFlag; } } }