|
@ -182,5 +182,15 @@ namespace pEp { |
|
|
return ret; |
|
|
return ret; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Attention, it pads left...
|
|
|
|
|
|
string padTo(const string &str, const size_t num, const char paddingChar) |
|
|
|
|
|
{ |
|
|
|
|
|
string ret{ str }; |
|
|
|
|
|
if (num > ret.size()) { |
|
|
|
|
|
ret.insert(0, num - ret.size(), paddingChar); |
|
|
|
|
|
} |
|
|
|
|
|
return ret; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} // namespace Utils
|
|
|
} // namespace Utils
|
|
|
} // namespace pEp
|
|
|
} // namespace pEp
|
|
|