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.
| 50 | // 'leadingDelimiter' is either the CSV delimiter or an empty string for the |
| 51 | // first column. |
| 52 | std::wstring |
| 53 | BuildColumnFormat(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",\"") |