uri: add pq convenience query

This commit is contained in:
Danny Robson 2022-02-25 10:52:09 +10:00
parent 2e645cc82d
commit cd42dc11b1

13
uri.hpp
View File

@ -97,16 +97,19 @@ namespace cruft {
std::string_view heirarchical (void) const&; //{ return { user ().begin (), path ().end () }; }
std::string_view authority (void) const&; //{ return { user ().begin (), port ().end () }; }
std::string_view pq (void) const&
{
return {
m_views[PATH].begin (),
m_views[QUERY].end ()
};
}
std::string_view
pqf (void) const& {
return {
m_views[PATH].begin (),
std::size_t (
std::distance (
m_views[PATH].begin (),
m_views[FRAGMENT].end ()
)
)
};
}