Fix bug when string length is 0

I found the bug and fixed it. Turns out, the code Lesley Shannon gave us
does not consider when the length of lineA (when read from test.cpp) is
0 (aka no string). I fixed it and now it runs perfectly.

I also implemented such that when you use tabs in test.cpp, it will
erase those too.