better table print, order by/offset/limit improvements

This commit is contained in:
2021-08-01 10:40:47 +02:00
parent 34e432d031
commit 70c036f08c
17 changed files with 3037 additions and 60 deletions

22
clib/ml_string.h Normal file
View File

@@ -0,0 +1,22 @@
#pragma once
#include <string>
#include <regex>
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::vector<std::string> regexp_strsplit(const std::string &string_to_split, const std::string &rgx_str);
std::string string_lucase(std::string s, const std::string &strcase);
std::string string_trim(std::string s, const std::string &chars_to_trim, const std::string &rltrim);
std::string string_padd(const std::string & str, int pad_len, char fill_char, bool from_right);
std::string string_substring(const std::string & str, long pos, long count);
size_t string_find_substr(const std::string & str, const std::string & pattern, long pos);