MVault 0.0.1
Loading...
Searching...
No Matches
Classes | Functions
Csv parser functions

All functions for working with DataStorage and csv. More...

Classes

class  mvlt::CsvParser
 A class for parsing csv files that provides data in a form similar to generators. More...
 

Functions

std::string mvlt::FormatStringToCsv (const std::string &str) noexcept
 A function for converting a string to a csv field format.
 

Detailed Description

All functions for working with DataStorage and csv.


Function Documentation

◆ FormatStringToCsv()

std::string mvlt::FormatStringToCsv ( const std::string &  str)
noexcept

A function for converting a string to a csv field format.

In csv files, the fields of one record are separated by commas. To store commas inside a field, the field is placed in double quotes.
To store quotes inside a field, the fields are placed in quotation marks, and all quotes inside the field are duplicated.

For example: string ",,"", will be turned into """,,""""". <br> Detailed description of each symbol: - " - a quotation mark to start escaping

  • "" - two quotation marks to indicate the quotation mark character inside the escape
  • ,, - the comma characters
  • "" - two quotation marks to indicate the quotation mark character inside the escape
  • "" - two quotation marks to indicate the quotation mark character inside the escape
  • " - a quotation mark to end escaping
Parameters
[in]strthe string to be converted
Returns
returns a string in csv format