goja-core/src/main/java/goja/core/kits/lang/Strs.java
public static String[] trimArrayElements(String[] array) {
        if (ObjectKit.isEmpty(array)) {
            return new String[0];
        }
        String[] result = new String[array.length];
        for (int i = 0; i < array.length; i++) {
            String element = array[i];
            result[i] = (element != null ? element.trim() : null);
        }
        return result;
    }
public static String[] trimArrayElements(String[] array) {
        if (ObjectKit.isEmpty(array)) {
            return new String[0];
        }
        String[] result = new String[array.length];
        for (int i = 0; i < array.length; i++) {
            String element = array[i];
            result[i] = (element != null ? element.trim() : null);
        }
        return result;
    }
public static String [ ] trimArrayElements ( String [ ] array ) { if ( ObjectKit . isEmpty ( array ) ) { return new String [ 0 ] ; } String [ ] result = new String [ array . length ] ; for ( int i = 0 ; i < array . length ; i ++ ) { String element = array [ i ] ; result [ i ] = ( element != null ? element . trim ( ) : null ) ; } return result ; }
Trim the elements of the given String array,
calling {@code String.trim()} on each of them.

@param array the original String array
@return the resulting array (of the same size) with trimmed elements
Trim the elements of the given String array calling { @code String . trim () } on each of them .