I have a const std::vector<char>
- not null-terminated. I want to print it using the fmt library, without making a copy of the vector.
I would have hoped that specifying the precision would suffice, but the fmt documentation says that :
Note that a C string must be null-terminated even if precision is specified.
Well, mine isn't. Must I make a copy and pad it with \0
, or is there something else I can do?
cout <<
in a loop? #10750557 – Ogstring_view
and use that. – Kob