Commit 7d96883d authored by Max Kellermann's avatar Max Kellermann

lib/upnp/Util: use std::string::erase() instead of ..::replace()

parent 28c5e7e6
......@@ -30,11 +30,11 @@ trimstring(std::string &s, const char *ws) noexcept
s.clear();
return;
}
s.replace(0, pos, std::string());
s.erase(0, pos);
pos = s.find_last_not_of(ws);
if (pos != std::string::npos && pos != s.length()-1)
s.replace(pos + 1, std::string::npos, std::string());
s.erase(pos + 1);
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment