String helper for using printf-like formats.
More...
#include <Stringify.hpp>
|
static std::string | format (const char *fmt,...) |
|
static std::string | format (const char *fmt, va_list args) |
|
String helper for using printf-like formats.
The Stringify class provides the format method. Its prototype is the same as the printf function. As a result, it gives a string object holding the same text that the printf function would have produced.
cout <<
Stringify::format (
"we got %d items which represents %f percent", 123, 57.3) << endl;
static std::string format |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
|
inlinestatic |
Generates a string object with a printf-like prototype.
- Parameters
-
[in] | fmt | : the format of the string |
[in] | ... | : variable number of arguments |
- Returns
- the string
static std::string format |
( |
const char * |
fmt, |
|
|
va_list |
args |
|
) |
| |
|
inlinestatic |
Generates a string object with a printf-like prototype.
- Parameters
-
[in] | fmt | : the format of the string |
[in] | args. | : list of arguments |
- Returns
- the string
The documentation for this class was generated from the following file:
- /builds/workspace/publish-doc-api-gitlab/gatb-core/src/gatb/tools/misc/impl/Stringify.hpp