Also...I wonder if there's some clever way to share code with `getColOffset()`, since the logic is very similar - the only difference is whether you're returning the char index or the column index, and the loop end condition. (It's slightly obscured by the fact that `getColOffset()` just gets the portion of the line up to the char index, but you could rewrite it to just get the whole line, and just use a different end condition for the two cases.) That said, it's a fairly small amount of code so it's probably not important to be that clever...