- added description substrings to output of merge command
This commit is contained in:
Johannes Schlatow 2010-10-20 22:41:45 +02:00
parent 1e38cbd6a0
commit af490fb634
3 changed files with 35 additions and 9 deletions

View file

@ -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;
}
}
////////////////////////////////////////////////////////////////////////////////