| 27 | }; |
| 28 | |
| 29 | static std::string addEscapes(char toEscape, char escape, const std::string& val) { |
| 30 | uint64_t i = 0; |
| 31 | std::string escapedStr = ""; |
| 32 | auto found = val.find(toEscape); |
| 33 | |
| 34 | while (found != std::string::npos) { |
| 35 | while (i < found) { |
| 36 | escapedStr += val[i]; |
| 37 | i++; |
| 38 | } |
| 39 | escapedStr += escape; |
| 40 | found = val.find(toEscape, found + sizeof(escape)); |
| 41 | } |
| 42 | while (i < val.length()) { |
| 43 | escapedStr += val[i]; |
| 44 | i++; |
| 45 | } |
| 46 | return escapedStr; |
| 47 | } |
| 48 | |
| 49 | static bool requireQuotes(const ExportCSVBindData& exportCSVBindData, const uint8_t* str, |
| 50 | uint64_t len, std::atomic<bool>& parallelFlag) { |
no test coverage detected