mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Text Formatting
- Added a format overload for three integers.
This commit is contained in:
parent
1de2f9e6f1
commit
d14a9cacec
2 changed files with 15 additions and 0 deletions
14
src/text.cpp
14
src/text.cpp
|
@ -1011,6 +1011,20 @@ const std::string format (
|
|||
return output;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::string format (
|
||||
const std::string& fmt,
|
||||
int arg1,
|
||||
int arg2,
|
||||
int arg3)
|
||||
{
|
||||
std::string output = fmt;
|
||||
replace_positional (output, "{1}", format (arg1));
|
||||
replace_positional (output, "{2}", format (arg2));
|
||||
replace_positional (output, "{3}", format (arg3));
|
||||
return output;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::string format (
|
||||
const std::string& fmt,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue