common
: utils to split / join / repeat strings (from json converter) (#11342)
* Factor string_join, string_split, string_repeat into common * json: refactor to surface a versatile builder * Update common.cpp
This commit is contained in:
parent
3e3357fd77
commit
a94f3b2727
4 changed files with 90 additions and 64 deletions
|
@ -429,6 +429,10 @@ std::string string_format(const char * fmt, ...);
|
|||
std::string string_strip(const std::string & str);
|
||||
std::string string_get_sortable_timestamp();
|
||||
|
||||
std::string string_join(const std::vector<std::string> & values, const std::string & separator);
|
||||
std::vector<std::string> string_split(const std::string & str, const std::string & delimiter);
|
||||
std::string string_repeat(const std::string & str, size_t n);
|
||||
|
||||
void string_replace_all(std::string & s, const std::string & search, const std::string & replace);
|
||||
|
||||
template<class T>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue