Android examples for java.lang:String Split
split string To Long Array
import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.lang.reflect.Array; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.regex.Pattern; public class Main{ public static long[] splitToLongArray(String string, String delimiter) { List<String> stringList = splitToStringList(string, delimiter); long[] longArray = new long[stringList.size()]; int i = 0; for (String str : stringList) { longArray[i++] = Long.parseLong(str); }/*from ww w . j a v a 2 s .c om*/ return longArray; } }