public static List<String> split(CharSequence input, char separator) {
        if (input.length() == 0) {
            return Collections.emptyList();
        }
        List<String> result = new ArrayList<String>();
        int lastpos = -1;
        for (int pos = 0; pos < input.length(); pos++) {
            char ch = input.charAt(pos);
            if (ch == separator) {
                if (lastpos >= 0) {
                    result.add(input.subSequence(lastpos, pos).toString());
                    lastpos = -1;
                }
                // don't add empty parts
            }
            else if (lastpos < 0) {
                lastpos = pos;
            }
        }
        if (lastpos == 0) {
            return Collections.singletonList(input.toString());
        }
        if (lastpos >= 0) {
            result.add(input.subSequence(lastpos, input.length()).toString());
        }
        return result;
    }