Design Pattern Examples
Overview of object-oriented design patterns
formatstring.cpp File Reference

Implementation of the formatstring() function that replaces sprintf() and snprintf() by allocating the right-sized buffer and returning it. More...

#include <cstdlib>
#include <cstring>
#include <cstdarg>
#include <vector>
#include "formatstring.h"
Include dependency graph for formatstring.cpp:

Go to the source code of this file.

Namespaces

namespace  Helpers
 The namespace containing all the "helper" functions in the C++ code.
 

Functions

std::string formatstring (const char *fmt,...)
 Use the given string and arguments to return a buffer containing the formatted string. The format and arguments follow the printf() functionality.
 

Detailed Description

Implementation of the formatstring() function that replaces sprintf() and snprintf() by allocating the right-sized buffer and returning it.

Definition in file formatstring.cpp.