MCPcopy Create free account
hub / github.com/DFIR-ORC/dfir-orc / BuildColumnFormat

Function BuildColumnFormat

src/OrcLib/CsvFileWriter.cpp:52–57  ·  view source on GitHub ↗

Returns the format string for a non-string column, e.g. L",{:02X}" or L",{}". 'leadingDelimiter' is either the CSV delimiter or an empty string for the first column.

Source from the content-addressed store, hash-verified

50// 'leadingDelimiter' is either the CSV delimiter or an empty string for the
51// first column.
52std::wstring
53BuildColumnFormat(std::wstring_view leadingDelimiter, std::wstring_view userFormat, std::wstring_view defaultFormat)
54{
55 const auto effectiveFormat = userFormat.empty() ? defaultFormat : userFormat;
56 return fmt::format(L"{}{}", leadingDelimiter, effectiveFormat);
57}
58
59// Fills the Prefix / Suffix fields of a string column.
60// Prefix = leadingDelimiter + openingStringDelimiter (e.g. L",\"")

Callers 1

SetSchemaMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected