I'm considering transitioning from snprintf and its ilk to fmtlib. Imagine this fictional code:
class CFoo
{
size_t m_szLen{0};
wchar_t m_pwcDst[123]{};
...
public:
void Bar(double dValue, uint8 u8TotDecimals)
{
m_szLen += swprintf_s(&m_pwcDst[m_szLen], _countof(m_pwcDst)-m_szLen, L"%.*f", u8TotDecimals, dValue);
}
};
How would I convert this to fmtlib WITHOUT copying std::wstring or fmt_memory_buffer? So, I want fmt::format_to to use my existing buffer.