string pad/rpad/lpad

This commit is contained in:
2021-02-28 12:53:06 +01:00
parent 08b5053829
commit 46b29fc229
7 changed files with 49 additions and 28 deletions

View File

@@ -6,9 +6,10 @@
#include <string>
#include <regex>
// Replace a substring with a replacement string in a source string
void replace_substring(std::string &src, const std::string &substr, const std::string &replacement);
// Returns true if where contains regex
bool regexp_search(const std::string &where, const std::string &regex_str);
std::string string_padd(const std::string & str, int pad_len, char fill_char, bool from_right);