@Nonnull
    public static String[] split(@Nonnull String source, @Nonnull String delimiters, boolean returnDelimiters, boolean trim) {
        final List<String> values = splitToList(source, delimiters, returnDelimiters, trim);
        final String[] result = new String[values.size()];
        values.toArray(result);
        return result;
    }
@Nonnull
    public static String[] split(@Nonnull String source, @Nonnull String delimiters, boolean returnDelimiters, boolean trim) {
        final List<String> values = splitToList(source, delimiters, returnDelimiters, trim);
        final String[] result = new String[values.size()];
        values.toArray(result);
        return result;
    }
@ Nonnull public static String [ ] split ( @ Nonnull String source , @ Nonnull String delimiters , boolean returnDelimiters , boolean trim ) { final List < String > values = splitToList ( source , delimiters , returnDelimiters , trim ) ; final String [ ] result = new String [ values . size ( ) ] ; values . toArray ( result ) ; return result ; }
Split a string and return the values as an array.

@param delimiters delimiters that are accepted by StringTokenizer
Split a string and return the values as an array .