001    /*******************************************************************************
002     * Copyright (c) 2009 Progress Software, Inc.
003     *
004     * All rights reserved. This program and the accompanying materials
005     * are made available under the terms of the Eclipse Public License v1.0
006     * which accompanies this distribution, and is available at
007     * http://www.eclipse.org/legal/epl-v10.html
008     *
009     *******************************************************************************/
010    package org.fusesource.hawtjni.generator.util;
011    
012    /**
013     * 
014     * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
015     */
016    public class TextSupport {
017        
018        static public String cast(String cast) {
019            cast = cast.trim();
020            if (cast.length() > 0) {
021                if (!cast.startsWith("("))
022                    cast = "(" + cast;
023                if (!cast.endsWith(")"))
024                    cast = cast + ")";
025            }
026            return cast;
027        }
028        
029    }