mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-09 01:25:17 -04:00
RsUrl add method to test presence and get fields from query
This commit is contained in:
parent
b1aa1fc26f
commit
d113f60ca1
2 changed files with 9 additions and 0 deletions
|
@ -201,6 +201,13 @@ RsUrl& RsUrl::delQueryK(const std::string& key)
|
|||
mQuery.erase(key);
|
||||
return *this;
|
||||
}
|
||||
bool RsUrl::hasQueryK(const std::string& key)
|
||||
{ return (mQuery.find(key) != mQuery.end()); }
|
||||
const std::string* RsUrl::getQueryV(const std::string& key)
|
||||
{
|
||||
if(hasQueryK(key)) return &(mQuery.find(key)->second);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const std::string& RsUrl::fragment() const { return mFragment; }
|
||||
RsUrl& RsUrl::setFragment(const std::string& fragment)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue