资 源 简 介
Introduction
This is a library for parsing text files.
The records could be comma delimited, tab delimited or delimited with any set of characters.
The csv_parser class is used to parse text files to extract records and fields.
We are making the following assumptions :
The record terminator is only one character in length.
The field terminator is only one character in length.
The fields are enclosed by single characters, if any.
The parser can handle documents where fields are always enclosed, not enclosed at all or optionally enclosed.
When fields are strictly all enclosed, there is an assumption that any enclosure characters within the field are escaped by placing a backslash in front of the enclosure character.
The CSV files can be parsed in 3 modes.
(a) No enclosures
(b) Fields always enclosed.
(c) Fields optionally enclosed.