Here you can find the source of toArray(String source, String delimiter)
public static String[] toArray(String source, String delimiter)
//package com.java2s; //License from project: Apache License public class Main { public static String[] toArray(String source, String delimiter) { if (isEmpty(source)) { return new String[0]; } else {/*from w w w . j av a2s. com*/ return source.split(delimiter); } } public static boolean isEmpty(String value) { return value == null || value.length() == 0; } }