Java String Quote quoteString(String quoted, String quoteFlag)

Here you can find the source of quoteString(String quoted, String quoteFlag)

Description

quote String

License

Open Source License

Declaration

public static String quoteString(String quoted, String quoteFlag) 

Method Source Code

//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;
        }
    }
}

Related

  1. quoteString(final String string)
  2. quoteString(final String text)
  3. quoteString(String arg)
  4. quoteString(String aTarget, String aPrefix, String aSuffix)
  5. quoteString(String in)
  6. quoteString(String s)
  7. quoteString(String s)
  8. quoteString(String s)
  9. quoteString(String s)