For example if I have the string "ABCD" and I would like to get all subsequences of length 2 of this string, starting at index 0 , the output would be {AB,AC,AD}.