cppcore
A small, portable C++ core library
Loading...
Searching...
No Matches
cppcore::CsvReader Class Reference

This class implements a robust CSV reader that handles quoted fields and commas within quotes. More...

#include <CsvReader.h>

Public Member Functions

 CsvReader ()=default
 Default constructor.
 ~CsvReader ()=default
 Default destructor.

Static Public Member Functions

static std::vector< std::vector< std::string > > readFromFile (const std::string &filepath)
 Read CSV file robustly, handling quoted fields and commas within quotes.

Detailed Description

This class implements a robust CSV reader that handles quoted fields and commas within quotes.

Definition at line 39 of file CsvReader.h.

Constructor & Destructor Documentation

◆ CsvReader()

cppcore::CsvReader::CsvReader ( )
default

Default constructor.

◆ ~CsvReader()

cppcore::CsvReader::~CsvReader ( )
default

Default destructor.

Member Function Documentation

◆ readFromFile()

std::vector< std::vector< std::string > > cppcore::CsvReader::readFromFile ( const std::string & filepath)
inlinestatic

Read CSV file robustly, handling quoted fields and commas within quotes.

Parameters
[in]filepathThe path to the CSV file to be read.
Returns
A vector of vectors of strings representing the CSV data.

Definition at line 50 of file CsvReader.h.


The documentation for this class was generated from the following file: