csv-parser 1.1.0
Csv::Parser (csv-parser)
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
Csv::CellStringBuffer< Size > Class Template Reference

A helper class for compile-time buffer construction and string unescaping. More...

#include <csv_cell_string_buffer.h>

Public Member Functions

constexpr CellStringBuffer (std::string_view cell, bool has_escaped_quotes)
 Constructor.
 
constexpr std::string_view getStringView () const
 Return a string view to the stored data.
 
constexpr std::size_t getBufferSize () const noexcept
 Return buffer size, as determined by the template parameter.
 

Detailed Description

template<std::size_t Size>
class Csv::CellStringBuffer< Size >

A helper class for compile-time buffer construction and string unescaping.

Template Parameters
SizeBuffer size (number of characters without any terminating null).

Constructor & Destructor Documentation

◆ CellStringBuffer()

template<std::size_t Size>
constexpr Csv::CellStringBuffer< Size >::CellStringBuffer ( std::string_view  cell,
bool  has_escaped_quotes 
)
inlineexplicitconstexpr

Constructor.

Copies the cleaned-up cell data into the buffer.

Parameters
cellCell data to clean up and copy into the buffer.
has_escaped_quotesIf true, the data in cell is cleaned up (unescaped) before being copied into the buffer.
Exceptions
std::out_of_rangeif the buffer is too small to hold the cleaned-up string.

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