arg_router
1.4.0
C++ command line argument parsing and routing
|
#include <arg_router/utility/exception_formatter.hpp>
Static Public Member Functions | |
static string | format (const vector< parsing::token_type > &tokens) |
An incredibly simple and dumb formatter specifically for translated exception messages.
Only two placeholders are supported:
An empty bracket pair in the placeholder for a single token type.
Whilst a bracket pair with at least one character in will greedily consume all remaining tokens, usng the string in the brace pair as the joining string for the remaining tokens. The brackets are checked at compile-time so that there is a maximum of only one greedy placeholder per string, and that it comes after the single token placeholders (if any).
If there are more tokens than placeholders, and none of the placeholders are greedy, then the remaining tokens are ignored. If there are less tokens, then the placeholders are replaced with empty strings.
S | Compile-time string type |
Definition at line 53 of file exception_formatter.hpp.
|
inlinestatic |
Format the string using tokens and rules in the description.
tokens | Tokens to use |
Definition at line 96 of file exception_formatter.hpp.