Definition at line 315 of file DelimitedTextWriter.cpp.
317{
318 const bool needs_quote = force_quote
320 || text.find('"') != std::string_view::npos
321 || text.find('\r') != std::string_view::npos
322 || text.find('\n') != std::string_view::npos;
323
324 if (needs_quote)
326
327 if (needs_quote) {
328 for (const char c : text) {
329 if (c == '"')
331
333 }
334 } else {
335 if (text.size() > static_cast<size_t>(
336 std::numeric_limits<std::streamsize>::max())) {
337 m_last_error =
"Delimited text cell exceeds stream size";
338 return false;
339 }
340
341 m_file.write(text.data(),
static_cast<std::streamsize
>(text.size()));
342 }
343
344 if (needs_quote)
346
349 return false;
350 }
351
352 return true;
353}
References m_active_delimiter, m_file, and m_last_error.
Referenced by open(), and write_element().