MCPcopy Create free account
hub / github.com/Tablecruncher/tablecruncher / quoteString

Method quoteString

src/csvtable.cpp:1181–1191  ·  view source on GitHub ↗

writes string "data" with quotation to ofstream "output" – all in UTF-8

Source from the content-addressed store, hash-verified

1179// writes string "data" with quotation to ofstream "output" – all in UTF-8
1180//
1181void CsvTable::quoteString(std::string &data, std::ostream &output, CsvDefinition definition) {
1182 int lineLen = data.size();
1183 output << definition.quote;
1184 for( int i = 0; i < lineLen; i++ ) {
1185 if( data[i] == definition.quote ) {
1186 output << definition.quote;
1187 }
1188 output << data[i];
1189 }
1190 output << definition.quote;
1191}
1192
1193
1194//

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected