mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
More uses of string_view
This commit is contained in:
1 parent
d0ee5fc308
commit
19eeaef2ea
11 files changed
+53
-45
No files matched your search
@@ -26,12 +26,12 @@ bool RequestHeader::GetParamValue(const char *param_name, std::string *value) co
|
||||
if (!params)
|
||||
return false;
|
||||
std::string p(params);
|
||||
std::vector<std::string> v;
|
||||
std::vector<std::string_view> v;
|
||||
SplitString(p, '&', v);
|
||||
for (size_t i = 0; i < v.size(); i++) {
|
||||
std::vector<std::string> parts;
|
||||
std::vector<std::string_view> parts;
|
||||
SplitString(v[i], '=', parts);
|
||||
DEBUG_LOG(IO, "Param: %s Value: %s", parts[0].c_str(), parts[1].c_str());
|
||||
DEBUG_LOG(IO, "Param: %.*s Value: %.*s", parts[0].size(), parts[0].data(), parts[1].size(), parts[1].data());
|
||||
if (parts[0] == param_name) {
|
||||
*value = parts[1];
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user