| 166 | int32_t Uri::port() const { return impl_->port_; } |
| 167 | |
| 168 | std::string Uri::username() const { |
| 169 | auto userpass = TextRangeToView(impl_->uri_.userInfo); |
| 170 | auto sep_pos = userpass.find_first_of(':'); |
| 171 | if (sep_pos != std::string_view::npos) { |
| 172 | userpass = userpass.substr(0, sep_pos); |
| 173 | } |
| 174 | return UriUnescape(userpass); |
| 175 | } |
| 176 | |
| 177 | std::string Uri::password() const { |
| 178 | auto userpass = TextRangeToView(impl_->uri_.userInfo); |