Here you can find the source of splitter(String line, char delimeter)
public static String[] splitter(String line, char delimeter)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { public static String[] splitter(String line, char delimeter) { List<String> strs = new ArrayList<>(); int idxOfNextWord = 0; for (int i = 0; i < line.length(); i++) { if (line.charAt(i) == delimeter) { strs.add(line.substring(idxOfNextWord, i)); idxOfNextWord = i + 1;// w w w. j av a 2 s. c o m } if (i == line.length() - 1 && line.charAt(i) == delimeter) { strs.add(""); } } return strs.toArray(new String[0]); } }