Resolve conflict on http::client get

This commit is contained in:
Fireball Wayne committed 2017-03-11 00:23:49 -05:00
1 parent e68ea3bc3a
commit 8853b72684
5 files changed
+55 -11

No files matched your search

+20
View File
@@ -279,6 +279,26 @@ void SplitString(const std::string& str, const char delim, std::vector<std::stri
}
}
void FindQuotedStrings(const std::string& str, std::vector<std::string>& output)
{
size_t next = 0;
bool even = 0;
for (size_t pos = 0, len = str.length(); pos < len; ++pos) {
if (str[pos] == '\"' || str[pos] == '\'') {
if (even) {
//quoted text
output.push_back(str.substr(next, pos - next));
even = 0;
} else {
//non quoted text
even = 1;
}
// Skip the delimiter itself.
next = pos + 1;
}
}
}
std::string ReplaceAll(std::string result, const std::string& src, const std::string& dest)
{
size_t pos = 0;