Get line length of a string