many: use Mu::Regex instead of std::regex
The former is PCRE-compatible, and faster than std::regex.
This commit is contained in:
@ -39,7 +39,6 @@
|
||||
#include <cinttypes>
|
||||
#include <charconv>
|
||||
#include <limits>
|
||||
#include <regex>
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib/gprintf.h>
|
||||
@ -261,15 +260,6 @@ Mu::split(const std::string& str, char sepa)
|
||||
return vec;
|
||||
}
|
||||
|
||||
std::vector<std::string>
|
||||
Mu::split(const std::string& str, const std::regex& sepa_rx)
|
||||
{
|
||||
std::sregex_token_iterator it(str.begin(), str.end(), sepa_rx, -1);
|
||||
std::sregex_token_iterator end;
|
||||
|
||||
return {it, end};
|
||||
}
|
||||
|
||||
std::string
|
||||
Mu::join(const std::vector<std::string>& svec, const std::string& sepa)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user