[Lazarus] CSV parser class
Juha Manninen
juha.manninen at phnet.fi
Sun Jan 24 13:16:59 CET 2010
Hi,
I think there is need for an OPTIMIZED code for splitting and joining.
TStringList.DelimitedText is good when speed is not very important.
See:
http://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg18548.html
I didn't look at tiOPF project's implementation so I don't know how optimized
it is.
"CSV" is little misleading because the separator can be some other than comma.
Text itself often has commas and thus the text between separators must be
quoted. TAB is a much better separator because it seldom occurs in text.
Splitting can be slow. It creates and copies strings and allocates small
chunks of memory.
There should be variations for those functions. Sometimes you want to support
quoted stings, sometimes not.
Sometimes you want TStrings, sometimes an array of string (which allows more
optimization).
Regards,
Juha Manninen
More information about the Lazarus
mailing list