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