Vince's CSV Parser
Loading...
Searching...
No Matches
csv_row.hpp File Reference

Defines the data type used for storing information about a CSV row. More...

#include <cmath>
#include <iterator>
#include <memory>
#include <limits>
#include <mutex>
#include <unordered_set>
#include <string>
#include <sstream>
#include <vector>
#include "common.hpp"
#include <ranges>
#include "data_type.hpp"
#include "parse_hex.hpp"
#include "raw_csv_data.hpp"

Go to the source code of this file.

Classes

class  csv::CSVField
 Data type representing individual CSV values. More...
 
class  csv::CSVRow
 Data structure for representing CSV rows. More...
 
class  csv::CSVRow::iterator
 A random access iterator over the contents of a CSV row. More...
 

Namespaces

namespace  csv
 The all encompassing namespace.
 

Macros

#define CSV_INIT_WITH_OPTIONAL_DCL(data_ref, value_ref, ...)
 

Functions

std::string csv::internals::json_escape_string (csv::string_view s) noexcept
 
csv::string_view csv::internals::get_trimmed (csv::string_view sv, const WhitespaceMap &ws_flags) noexcept
 
template<>
std::string csv::CSVField::get< std::string > ()
 Retrieve this field's original string.
 
template<>
CONSTEXPR_14 csv::string_view csv::CSVField::get< csv::string_view > ()
 Retrieve a view over this field's string.
 
template<>
bool csv::CSVField::try_get< std::string > (std::string &out) noexcept
 Non-throwing retrieval of field as std::string.
 
template<>
CONSTEXPR_14 bool csv::CSVField::try_get< csv::string_view > (csv::string_view &out) noexcept
 Non-throwing retrieval of field as csv::string_view.
 

Detailed Description

Defines the data type used for storing information about a CSV row.

Definition in file csv_row.hpp.

Macro Definition Documentation

◆ CSV_INIT_WITH_OPTIONAL_DCL

#define CSV_INIT_WITH_OPTIONAL_DCL (   data_ref,
  value_ref,
  ... 
)
Value:
do { \
(void)(data_ref); \
if ((value_ref).empty()) { \
__VA_ARGS__ \
} \
} while (0)

Definition at line 37 of file csv_row.hpp.

Function Documentation

◆ get_trimmed()

csv::string_view csv::internals::get_trimmed ( csv::string_view  sv,
const WhitespaceMap ws_flags 
)
noexcept

Definition at line 11 of file csv_row.cpp.

◆ json_escape_string()

std::string csv::internals::json_escape_string ( csv::string_view  s)
noexcept

Definition at line 85 of file csv_row_json.cpp.