Line.substr() is a function that returns a string from the position to the end. In this case he is finding the position at the coma, then the function returns everything from that point to the end of the line. He does the same thing with the next line.
He increments the line counter,
and resizes both vectors.