mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-29 20:44:25 +00:00
implement Url::to_string
This commit is contained in:
parent
83def8fb85
commit
d6be03febf
@ -25,4 +25,17 @@ Url::Url(
|
||||
query = results[5];
|
||||
}
|
||||
|
||||
string Url::to_string()
|
||||
{
|
||||
string result;
|
||||
|
||||
if (!scheme.empty()) result += scheme + "://";
|
||||
if (!host.empty()) result += host;
|
||||
if (!port.empty()) result += ":" + port;
|
||||
if (!path.empty()) result += "/" + path;
|
||||
if (!query.empty()) result += "?" + query;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Url::~Url() = default;
|
@ -20,6 +20,8 @@ namespace lib
|
||||
std::string subject
|
||||
);
|
||||
|
||||
std::string to_string();
|
||||
|
||||
~Url();
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user