brain:string.h
string.h
#ifndef __SHAREWIZ_STRING_H__ #define __SHAREWIZ_STRING_H__ #include <string> #include <vector> #include <regex> // String class. template <typename T> std::string numberToString(T pNumber); std::vector<std::string> string_find(const std::string& s, const std::string& regex); std::string string_replace(const std::string& s, const std::string& regex, const std::string& replacement, std::regex_constants::match_flag_type flags = std::regex_constants::match_default); std::string string_replace(const std::string& s, const std::string& regex, const std::string& replacement, bool retain); bool string_match(const std::string& s, const std::string& regex, std::regex_constants::match_flag_type flags = std::regex_constants::match_default); void show_matches(const std::string& s, const std::string& regex); std::vector<std::string> string_tokenize(const std::string& s, const std::string& regex); #endif
brain/string.h.txt · Last modified: 2020/07/15 09:30 by 127.0.0.1