blob: a8abf577381e21dc0602720f7248e339c8db13c3 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2008 Innoopract Informationssysteme GmbH.
* 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:
* Innoopract Informationssysteme GmbH - initial API and implementation
******************************************************************************/
package org.eclipse.epp.wizard.internal;
/**
* @author Jordi Boehme Lopez <jboehme@innoopract.com>
*/
public class StringUtil {
public static String toCommaList( final String[] items, final boolean space )
{
StringBuilder result = new StringBuilder();
for( int i = 0; i < items.length; i++ ) {
if( i > 0 ) {
result.append( "," );
if( space ) {
result.append( " " );
}
}
result.append( items[ i ].trim() );
}
return result.toString();
}
}