23 int numCharsNeeded = 0;
24 std::vector<char> buffer;
27 numCharsNeeded = vsnprintf(NULL, 0, fmt, args) + 1;
28 buffer.resize(numCharsNeeded);
29 memset(&buffer[0], 0, numCharsNeeded);
30 vsnprintf(&buffer[0], numCharsNeeded, fmt, args2);
40 return std::string(&buffer[0]);
The namespace containing all the "helper" functions in the C++ code.
std::string formatstring(const char *fmt,...)
Use the given string and arguments to return a buffer containing the formatted string....