mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Text
- Added another format overload. Time for variadics?
This commit is contained in:
parent
4d4e740f5c
commit
9537a91e89
2 changed files with 17 additions and 0 deletions
16
src/text.cpp
16
src/text.cpp
|
@ -1024,6 +1024,22 @@ const std::string format (
|
|||
return output;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::string format (
|
||||
const std::string& fmt,
|
||||
int arg1,
|
||||
int arg2,
|
||||
int arg3,
|
||||
int arg4)
|
||||
{
|
||||
std::string output = fmt;
|
||||
replace_positional (output, "{1}", format (arg1));
|
||||
replace_positional (output, "{2}", format (arg2));
|
||||
replace_positional (output, "{3}", format (arg3));
|
||||
replace_positional (output, "{4}", format (arg4));
|
||||
return output;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::string format (
|
||||
const std::string& fmt,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue