public List<Pair<Integer, Integer>> createSplitList(char[] characters){
        List<Pair<Integer, Integer>> result = new ArrayList<>(8);

        int offset = findSplitStart(characters, 1);
        if (offset == -1) {
            return result; // Nothing at all. So we are already done
        }
        while(offset != -1) {

            int start = offset;
            int end= findSplitEnd(characters, start);

            result.add(new ImmutablePair<>(start, end));
            offset = findNextSplitStart(characters, end);
        }
        return result;
    }
Find the start offset of split

@param chars The input in which we are seeking
@param split  The split number for which we are looking for the start
@return The offset or -1 if it does not exist
analyzer/src/main/java/nl/basjes/parse/useragent/utils/Splitter.java