I know I can limit the size of a particular string argument, but IDK how to do it for the entire output. In other words can this program be written with only one call to format?
#include <string>
#include <iostream>
#include <fmt/format.h>
int LOG_MAX_MESSAGE_LENGTH = 11;
void f(const char* p) {
std::cout << fmt::format("{:.{}}", fmt::format("ABI is {}", p),
LOG_MAX_MESSAGE_LENGTH)
<< std::endl;
}
int main() {
f("hellooooo");
}