diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-22 13:11:56 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-22 13:11:56 -0500 |
| commit | 9a70f32ddaec0eef99efbf7ff5597c2adf08f45a (patch) | |
| tree | 1717d2b24d610b638cb70b12d7db74f15953f1fe /dev/lib/net/url.hpp | |
| parent | 8470a48ef4c6ea4b16e9a764aaedc7158f9c37ed (diff) | |
| parent | 58dc03a47576601006c4870d1633bf35fc78176a (diff) | |
Merge pull request #17 from amlel-el-mahrouss/develop
feat: library improvements
Diffstat (limited to 'dev/lib/net/url.hpp')
| -rw-r--r-- | dev/lib/net/url.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/dev/lib/net/url.hpp b/dev/lib/net/url.hpp index 4bbc271..60440ad 100644 --- a/dev/lib/net/url.hpp +++ b/dev/lib/net/url.hpp @@ -24,6 +24,8 @@ namespace ocl::net http, https, mailto, + ftp, + tel, bad = 0xff, }; @@ -53,6 +55,16 @@ namespace ocl::net m_protocol_ = url_protocol::mailto; this->operator/=(protocol.substr(std::size("mailto:"))); } + else if (protocol.starts_with("tel:")) + { + m_protocol_ = url_protocol::tel; + this->operator/=(protocol.substr(std::size("tel:"))); + } + else if (protocol.starts_with("ftp:")) + { + m_protocol_ = url_protocol::ftp; + this->operator/=(protocol.substr(std::size("ftp:"))); + } } ~basic_url() = default; |
