Tomographer
v1.0a
Tomographer C++ Framework Documentation
|
Utilities for formatting strings. More...
#include <cstdio>
#include <cstdarg>
#include <chrono>
#include <string>
#include <sstream>
#include <iostream>
#include <tomographer/tools/util.h>
Go to the source code of this file.
Classes | |
class | Tomographer::Tools::bad_fmts_format |
Exception for bad printf format. More... | |
Namespaces | |
Tomographer | |
Base namespace for the Tomographer project. | |
Tomographer::Tools | |
Various useful tools. | |
Macros | |
#define | streamstr(tokens) |
Utility macro to format stream tokens to a std::string . More... | |
#define | streamcstr(tokens) streamstr(tokens).c_str() |
Utility macro to format stream tokens to a C string. More... | |
Functions | |
std::string | Tomographer::Tools::vfmts (const char *fmt, va_list vl) |
printf- formatting to a std::string , with va_list pointer More... | |
std::string | Tomographer::Tools::fmts (const char *fmt,...) |
printf- format to a std::string More... | |
std::string | Tomographer::Tools::fmt_duration (double seconds) |
Format a number of seconds into a human-readable string. More... | |
template<typename Rep , typename Period > | |
std::string | Tomographer::Tools::fmt_duration (std::chrono::duration< Rep, Period > dt) |
Format a std::chrono::duration into a human-readable string. More... | |
Utilities for formatting strings.
Definition in file fmt.h.
#define streamcstr | ( | tokens | ) | streamstr(tokens).c_str() |
#define streamstr | ( | tokens | ) |
Utility macro to format stream tokens to a std::string
.
Usage example:
This is typically useful if you want to feed in C++ objects to a printf()-like function.