Я хотел бы разбить String определенной переменной длины. Он должен ограничивать проверку, чтобы не взорваться, когда последний раздел строки не длиннее или длиннее длины. Ищете самую краткую (еще понятную) версию.
Пример:
string x = "AAABBBCC";
string[] arr = x.SplitByLength(3);
// arr[0] -> "AAA";
// arr[1] -> "BBB";
// arr[2] -> "CC"