repeatFront: a shrinking front
Given a string and an int n, return the first n characters, then the first n-1, and so on down to just the first one. Step through repeatFront: this loop counts down, and i is the end of substring(0, i), so each piece is one letter shorter. (CodingBat promises n is between 0 and the length of the string.)