Here you can find the source of split_str(String input, String split)
public static final List<String> split_str(String input, String split)
//package com.java2s; //License from project: Open Source License import java.util.List; import java.util.ArrayList; public class Main { public static final List<String> split_str(String input, String split) { List<String> result = new ArrayList<String>(); int index = input.indexOf(split); int beg = 0; while (index != -1) { String str = input.substring(beg, index); beg = index + 1;/*from ww w . j av a 2 s .c om*/ result.add(str); index = input.indexOf(split, beg); } if (index == -1) { String str = input.substring(beg); result.add(str); } return result; } }