MSTL 1.4.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
url.hpp
1#ifndef MSTL_NETWORK_URL_HPP__
2#define MSTL_NETWORK_URL_HPP__
3#include "MSTL/core/interface/istringify.hpp"
5
6struct url : istringify<url> {
7 string scheme;
8 string host;
9 uint16_t port = 0;
10 string path;
11 string query;
12
13 url() = default;
14
15 explicit url(const string_view url_str) { parse(url_str); }
16 explicit url(const string& url_str) : url(url_str.view()) {}
17 explicit url(const char* url_str) : url(string_view(url_str)) {}
18
19 void parse(string_view str);
20
21 MSTL_NODISCARD string to_string() const;
22};
23
25#endif // MSTL_NETWORK_URL_HPP__
unsigned short uint16_t
16位无符号整数类型
#define MSTL_END_NAMESPACE__
结束全局命名空间MSTL
#define MSTL_BEGIN_NAMESPACE__
开始全局命名空间MSTL