93 void set_arg(
int index,
int value,
int min_length = 0);
100 void set_arg(
int index,
unsigned int value,
int min_length = 0);
107 void set_arg(
int index,
long unsigned int value,
int min_length = 0);
114 void set_arg(
int index,
long long value,
int min_length = 0);
121 void set_arg(
int index,
unsigned long long value,
int min_length = 0);
127 void set_arg(
int index,
float value);
133 void set_arg(
int index,
double value);
141 void create_arg(
int index,
int start,
int length);
147 ArgPosition() : start(0),
length(-1) { }
148 ArgPosition(
int s,
int l) : start(
s),
length(
l) {}
153 std::vector<ArgPosition> args;
163 template <
class Arg1>
170 template <
class Arg1,
class Arg2>
173 StringFormat f(format);
f.set_arg(1, arg1);
f.set_arg(2, arg2);
return f.get_result();
177 template <
class Arg1,
class Arg2,
class Arg3>
180 StringFormat f(format);
f.set_arg(1, arg1);
f.set_arg(2, arg2);
f.set_arg(3, arg3);
return f.get_result();
184 template <
class Arg1,
class Arg2,
class Arg3,
class Arg4>
187 StringFormat f(format);
f.set_arg(1, arg1);
f.set_arg(2, arg2);
f.set_arg(3, arg3);
f.set_arg(4, arg4);
return f.get_result();
191 template <
class Arg1,
class Arg2,
class Arg3,
class Arg4,
class Arg5>
194 StringFormat f(format);
f.set_arg(1, arg1);
f.set_arg(2, arg2);
f.set_arg(3, arg3);
f.set_arg(4, arg4);
f.set_arg(5, arg5);
return f.get_result();
198 template <
class Arg1,
class Arg2,
class Arg3,
class Arg4,
class Arg5,
class Arg6>
201 StringFormat f(format);
f.set_arg(1, arg1);
f.set_arg(2, arg2);
f.set_arg(3, arg3);
f.set_arg(4, arg4);
f.set_arg(5, arg5);
f.set_arg(6, arg6);
return f.get_result();
205 template <
class Arg1,
class Arg2,
class Arg3,
class Arg4,
class Arg5,
class Arg6,
class Arg7>
208 StringFormat f(format);
f.set_arg(1, arg1);
f.set_arg(2, arg2);
f.set_arg(3, arg3);
f.set_arg(4, arg4);
f.set_arg(5, arg5);
f.set_arg(6, arg6);
f.set_arg(7, arg7);
return f.get_result();
std::string string_format(const std::string &format)
See clan::StringFormat for details.
Definition: string_format.h:157