/** * <p>Strips whitespace from the start and end of every String in an array. * Whitespace is defined by {@link Character#isWhitespace(char)}.</p> * * <p>A new array is returned each time, except for length zero. * A <code>null</code> array will return <code>null</code>. * An empty array will return itself. * A <code>null</code> array entry will be ignored.</p> * * <pre> * StringUtils.stripAll(null) = null * StringUtils.stripAll([]) = [] * StringUtils.stripAll(["abc", " abc"]) = ["abc", "abc"] * StringUtils.stripAll(["abc ", null]) = ["abc", null] * </pre> * * @param strs the array to remove whitespace from, may be null * @return the stripped Strings, <code>null</code> if null array input */ public static String[] stripAll(String[] strs) { return stripAll(strs, null); }
/** * <p>Strips whitespace from the start and end of every String in an array. * Whitespace is defined by {@link Character#isWhitespace(char)}.</p> * * <p>A new array is returned each time, except for length zero. * A <code>null</code> array will return <code>null</code>. * An empty array will return itself. * A <code>null</code> array entry will be ignored.</p> * * <pre> * StringUtils.stripAll(null) = null * StringUtils.stripAll([]) = [] * StringUtils.stripAll(["abc", " abc"]) = ["abc", "abc"] * StringUtils.stripAll(["abc ", null]) = ["abc", null] * </pre> * * @param strs the array to remove whitespace from, may be null * @return the stripped Strings, <code>null</code> if null array input */ public static String[] stripAll(String[] strs) { return stripAll(strs, null); }
/** * <p>Strips whitespace from the start and end of every String in an array. * Whitespace is defined by {@link Character#isWhitespace(char)}.</p> * * <p>A new array is returned each time, except for length zero. * A <code>null</code> array will return <code>null</code>. * An empty array will return itself. * A <code>null</code> array entry will be ignored.</p> * * <pre> * StringUtils.stripAll(null) = null * StringUtils.stripAll([]) = [] * StringUtils.stripAll(["abc", " abc"]) = ["abc", "abc"] * StringUtils.stripAll(["abc ", null]) = ["abc", null] * </pre> * * @param strs the array to remove whitespace from, may be null * @return the stripped Strings, <code>null</code> if null array input */ public static String[] stripAll(String[] strs) { return stripAll(strs, null); }
/** * <p>Strips whitespace from the start and end of every String in an array. * Whitespace is defined by {@link Character#isWhitespace(char)}.</p> * * <p>A new array is returned each time, except for length zero. * A <code>null</code> array will return <code>null</code>. * An empty array will return itself. * A <code>null</code> array entry will be ignored.</p> * * <pre> * StringUtils.stripAll(null) = null * StringUtils.stripAll([]) = [] * StringUtils.stripAll(["abc", " abc"]) = ["abc", "abc"] * StringUtils.stripAll(["abc ", null]) = ["abc", null] * </pre> * * @param strs the array to remove whitespace from, may be null * @return the stripped Strings, <code>null</code> if null array input */ public static String[] stripAll(String[] strs) { return stripAll(strs, null); }
/** * <p>Strips whitespace from the start and end of every String in an array. * Whitespace is defined by {@link Character#isWhitespace(char)}.</p> * * <p>A new array is returned each time, except for length zero. * A <code>null</code> array will return <code>null</code>. * An empty array will return itself. * A <code>null</code> array entry will be ignored.</p> * * <pre> * StringUtils.stripAll(null) = null * StringUtils.stripAll([]) = [] * StringUtils.stripAll(["abc", " abc"]) = ["abc", "abc"] * StringUtils.stripAll(["abc ", null]) = ["abc", null] * </pre> * * @param strs the array to remove whitespace from, may be null * @return the stripped Strings, <code>null</code> if null array input */ public static String[] stripAll(String[] strs) { return stripAll(strs, null); }
/** * <p>Strips whitespace from the start and end of every String in an array. * Whitespace is defined by {@link Character#isWhitespace(char)}.</p> * * <p>A new array is returned each time, except for length zero. * A <code>null</code> array will return <code>null</code>. * An empty array will return itself. * A <code>null</code> array entry will be ignored.</p> * * <pre> * StringUtils.stripAll(null) = null * StringUtils.stripAll([]) = [] * StringUtils.stripAll(["abc", " abc"]) = ["abc", "abc"] * StringUtils.stripAll(["abc ", null]) = ["abc", null] * </pre> * * @param strs the array to remove whitespace from, may be null * @return the stripped Strings, <code>null</code> if null array input */ public static String[] stripAll(String[] strs) { return stripAll(strs, null); }
@Override public void startDocument(List<Node> nodes) { functionsArray = StringUtils.stripAll(StringUtils.split(functions, ",")); }
@Override public void startDocument(List<Node> nodes) { functionsArray = StringUtils.stripAll(StringUtils.split(functions, ",")); }
private static String[] toCqlStatements(String script) { return StringUtils.stripAll(StringUtils.split(script, ";")); } }
/** * Transforms a comma-separated list String property in to a array of trimmed strings. * * This works even if they are separated by whitespace characters (space char, EOL, ...) * */ static String[] getListFromProperty(Map<String, String> properties, String key) { return (String[]) ObjectUtils.defaultIfNull(StringUtils.stripAll(StringUtils.split(properties.get(key), ',')), new String[0]); }
/** * Transforms a comma-separated list String property in to a array of trimmed strings. * * This works even if they are separated by whitespace characters (space char, EOL, ...) * */ static String[] getListFromProperty(Map<String, String> properties, String key) { return (String[]) ObjectUtils.defaultIfNull(StringUtils.stripAll(StringUtils.split(properties.get(key), ',')), new String[0]); }
bomContents = bomContents.replaceAll("\\r", "\n"); String[] materialLines = bomContents.split("\\n"); materialLines = org.apache.commons.lang.StringUtils.stripAll(materialLines); for (String materialLine : materialLines) materialInfo = org.apache.commons.lang.StringUtils.stripAll(materialInfo); String libraryName = materialInfo[0]; String mavenInfo = materialInfo[1];
subStrings = StringUtils.stripAll( subStrings ); String resultPattern = StringUtils.join( subStrings, ":" );
} else if ( value instanceof String ) { String[] array = StringUtils.split((String) value, "," ); array = StringUtils.stripAll( array ); return new ArrayIterator( array ); } else if ( value instanceof Iterable ) {
} else if ( value instanceof String ) { String[] array = StringUtils.split((String) value, "," ); array = StringUtils.stripAll( array ); return new ArrayIterator( array ); } else if ( value instanceof Iterable ) {
public Iterator evaluateAsIterator(JellyContext context) { Object value = evaluateRecurse(context); if ( value == null ) { return EMPTY_ITERATOR; } else if ( value instanceof Iterator ) { return (Iterator) value; } else if ( value instanceof List ) { List list = (List) value; return list.iterator(); } else if ( value instanceof Map ) { Map map = (Map) value; return map.entrySet().iterator(); } else if ( value.getClass().isArray() ) { return new ArrayIterator( value ); } else if ( value instanceof Enumeration ) { return new EnumerationIterator((Enumeration ) value); } else if ( value instanceof Collection ) { Collection collection = (Collection) value; return collection.iterator(); } else if ( value instanceof String ) { String[] array = StringUtils.split((String) value, "," ); array = StringUtils.stripAll( array ); return new ArrayIterator( array ); } else { // XXX: should we return single iterator? return new SingletonIterator( value ); } } }
} else if ( value instanceof String ) { String[] array = StringUtils.split((String) value, "," ); array = StringUtils.stripAll( array ); return new ArrayIterator( array ); } else if ( value instanceof Iterable ) {