I need to read a text file which has ~10K lines
each line has 7 or 10 rows
each row is separated by TAB
the text file contains some lines which start with "//" and there is no need to store this specific lines.
there is another condition:
case column contains 1 char only and it is 0 or 1 or 2 or 3 or 4, then this will determine the next column's rows count.
if char is 0, 2 or 4 then all next column's row count is 7.
if char is 1 or 3 then all next column's row count is 7.
the row count will change only if there is "end" in the next line.
Also, each multi-row columns' last row is string
- i will need to store all values of all columns and rows in accesible location and i will need to give them names to know where to access to.
e.g. data.positionX and data.positionY are two separate values that exist in every multi-row column
Text file example:
Expand|Select|Wrap|Line Numbers
- //blabla
- //bla
- 1
- 2 55 69 14 10 200 //LineDescription
- end
- 3
- 2 55 69 14 10 200 55 199 22 //LineDescription
- end
So, What is the best method to read this file?
Also, can you give me general direction of how to manage to read it?
Thanks in advance!