class Strings {

    public static String[] separateGrams(String word, int gramSize) {
        if (gramSize < 1)
            throw new IllegalArgumentException("Gram size cannot be smaller than 1");
        if (gramSize > word.length())
            return EMPTY_STRING_ARRAY;
        String[] grams = new String[word.length() - gramSize + 1];
        for (int i = 0; i <= word.length() - gramSize; i++) {
            grams[i] = word.substring(i, i + gramSize);
        }
        return grams;
    }

    private  Strings();

}