Browse Source

pEpLog - some improve logH1, logH2

LIB-11
heck 4 years ago
parent
commit
052c6d5b81
  1. 12
      src/std_utils.cc

12
src/std_utils.cc

@ -99,7 +99,7 @@ namespace pEp {
} }
} }
} catch (...) { } catch (...) {
runtime_error e{"path_delete_all(\""+path+"\")"}; runtime_error e{ "path_delete_all(\"" + path + "\")" };
throw_with_nested(e); throw_with_nested(e);
} }
} }
@ -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

Loading…
Cancel
Save