mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 22:47:20 +02:00
Sync
- added description substrings to output of merge command
This commit is contained in:
parent
1e38cbd6a0
commit
af490fb634
3 changed files with 35 additions and 9 deletions
15
src/text.cpp
15
src/text.cpp
|
@ -654,3 +654,18 @@ int characters (const std::string& str)
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string cutOff (const std::string& str, std::string::size_type len)
|
||||
{
|
||||
if (str.length () > len)
|
||||
{
|
||||
return (str.substr(0,len-2) + "..");
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string res = str;
|
||||
res.resize (len, ' ');
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue