I need to parse a tab-delimited text file so I use the usual memoread() and memoline().
But I just realized memoline() convert tabs into spaces. Is there any alternative to it?
TIA
BCC5.82/BCC7.3
xHarbour/Harbour
I need to parse a tab-delimited text file so I use the usual memoread() and memoline().
But I just realized memoline() convert tabs into spaces. Is there any alternative to it?
TIA
Check out ttxtfile class.
Example in samples folder testfile.prg
Thanks Gale!
I was hoping for an alternative to memoline() so that don't have to resort to low level file manipulation. I am under the impression reading the whole file using memoread() and then extracting the lines from it would be faster
if you look at ttxtfile it works very nice. very easy to open file. skip through file and read each line/record.
TTxtFile is good.
Another alternative is :
cText := MemoRead( "myfile.txt" )
aLines := HB_ATokens( StrTran( cText, CRLF, Chr( 10 ) ), Chr( 10 ) )
Thank you both of you ![]()