utils: split: Rename all splitBy*() variants to split()
This commit is contained in:
@@ -47,7 +47,7 @@ std::pair<std::string, std::string> Request::createPairFromVar(std::string var)
|
||||
|
||||
void Request::initMultiMap(std::multimap<std::string, std::string> &map, const std::string &url)
|
||||
{
|
||||
auto splitted = utils::splitByChar(url, '&');
|
||||
auto splitted = utils::split(url, '&');
|
||||
for(const std::string &part : splitted)
|
||||
{
|
||||
auto pair = createPairFromVar(part);
|
||||
@@ -75,7 +75,8 @@ void Request::initPostMap(const std::string &url)
|
||||
void Request::initCookies(const std::string &cookiestr)
|
||||
{
|
||||
// TODO: find out what it really should be, ";" or "; "?
|
||||
auto cookiesplitted = utils::splitByRegex(cookiestr, ";+\\s?");
|
||||
std::regex regex { ";+\\s?" };
|
||||
auto cookiesplitted = utils::split(cookiestr, regex);
|
||||
for(const std::string &part : cookiesplitted)
|
||||
{
|
||||
auto pair = createPairFromVar(part);
|
||||
|
Reference in New Issue
Block a user