red0124 / ssp

C++ CSV parser
MIT License
48 stars 4 forks source link

How to get the header row? #45

Closed ludeen007 closed 6 months ago

ludeen007 commented 6 months ago

Thank you for providing a great library.

I want to get the header row of a .csv file which has unknown fields, how to do it?

red0124 commented 6 months ago

I am glad you find the library useful.

At the moment you can only check if the header contains a field using the field_exists method. If you need a method which returns, for example, an std::vector<std::string>> containing all the fields, I could add it, I see that it might be useful in some situations.

red0124 commented 6 months ago

The library now offers some methods to meet the requirements, starting from version 1.8.0.