/** * <p> * Remove whitespace from the front and back of a String. * </p> * * @param str the String to remove whitespace from * @return the stripped String */ public static String strip( String str ) { return strip( str, null ); }
/** * <p> * Strip the specified delimiter from the front and back of every String in the array. * </p> * * @param strs the Strings to remove a String from * @param delimiter the String to remove at start and end * @return the stripped Strings */ public static String[] stripAll( String[] strs, String delimiter ) { if ( ( strs == null ) || ( strs.length == 0 ) ) { return strs; } int sz = strs.length; String[] newArr = new String[sz]; for ( int i = 0; i < sz; i++ ) { newArr[i] = strip( strs[i], delimiter ); } return newArr; }
/** * <p>Remove whitespace from the front and back of a String.</p> * * @param str the String to remove whitespace from * @return the stripped String */ public static String strip( String str ) { return strip( str, null ); }
/** * <p>Removes all whitespace characters from the start and end of a String.</p> * * <p>This is similar to {@link #trim(String)} but removes whitespace. * Whitespace is defined by {@link Character#isWhitespace(char)}.</p> * * @param s the String to remove characters from, may be null * @return the trimmed String, <code>null</code> if null String input */ public static String trim( String s ) { return StringUtils.strip( s ); } }
/** * <p>Strip the specified delimiter from the front and back of * every String in the array.</p> * * @param strs the Strings to remove a String from * @param delimiter the String to remove at start and end * @return the stripped Strings */ public static String[] stripAll( String[] strs, String delimiter ) { if ( ( strs == null ) || ( strs.length == 0 ) ) { return strs; } int sz = strs.length; String[] newArr = new String[sz]; for ( int i = 0; i < sz; i++ ) { newArr[i] = strip( strs[i], delimiter ); } return newArr; }
protected void showErrorIfAny(final InputStream inputStream) throws Exception { if (inputStream != null) { final String input = IOUtil.toString(inputStream); this.logger.error(org.codehaus.plexus.util.StringUtils.strip(input, "\n")); } } }
for ( String plugin : pluginList ) plugin = StringUtils.strip( plugin ); log.debug( " plugin = " + plugin ); String tokens[] = plugin.split( ":" );
for ( String plugin : pluginList ) plugin = StringUtils.strip( plugin ); log.debug( " plugin = " + plugin ); String tokens[] = plugin.split( ":" );
branchTagName = StringUtils.strip( branchTagName, "/" );
branchTagName = StringUtils.strip( branchTagName, "/" );
String rootPartialGroupId = StringUtils.strip( root.getPath().replaceAll( "/", "." ), "." );
String rootPartialGroupId = StringUtils.strip( root.getPath().replaceAll( "/", "." ), "." );
String rootPartialGroupId = StringUtils.strip( root.getPath().replaceAll( "/", "." ), "." );
String rootPartialGroupId = StringUtils.strip( root.getPath().replaceAll( "/", "." ), "." );