I have an input file with 50000 rows. It is suppossed to be fixed format (30 chars).
But the inputs are strings.
e.g.
This is line one.
This is line one and complete.
This is line empty.
First line is 17 characters. Second line is 30 characters. Third line is 20 characters.
In my input file, as soon as the line gets over, the new line character is present.
However, I want the new line character exactly at the 31st position. Thus if a line is shorter then 30 characters, spaces should be padded to make it 30 chars line.
How to do this for this huge input file ?
Thanks for reading!
Isn’t it enough to pad the string?