Java tutorial
//package com.java2s; import java.util.ArrayList; import java.util.StringTokenizer; public class Main { public static ArrayList splitStringByCharC(String str, String c) { StringTokenizer en = new StringTokenizer(str, c); ArrayList vec = new ArrayList(); while (en.hasMoreElements()) vec.add(en.nextElement()); return vec; } }