From ccd20fdd747f06ecd6a266242608e668eff944a4 Mon Sep 17 00:00:00 2001 From: heck Date: Tue, 1 Jun 2021 22:22:46 +0200 Subject: [PATCH] std_utils: padTo() --- src/std_utils.hh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/std_utils.hh b/src/std_utils.hh index 22de58c..de67c1f 100644 --- a/src/std_utils.hh +++ b/src/std_utils.hh @@ -25,7 +25,6 @@ namespace pEp { void print_exception(const std::exception &e, int level = 0); // file utils - bool path_exists(const std::string &filename); bool path_is_dir(const std::string &path); void path_delete(const std::string &filename); @@ -42,6 +41,10 @@ namespace pEp { const std::string &dirname, const bool incl_dot_and_dotdot = false); std::vector dir_list_files(const std::string &dirname); + + //String formatting + std::string padTo(const std::string &str, const size_t num, const char paddingChar); + } // namespace Utils } // namespace pEp