Go to the documentation of this file.
25 #include "absl/strings/str_format.h"
26 #include "absl/strings/string_view.h"
33 if (!host.
empty() && host[0] !=
'[' && host.
rfind(
':') != host.
npos) {
45 if (!
name.empty() &&
name[0] ==
'[') {
47 const size_t rbracket =
name.find(
']', 1);
52 if (rbracket ==
name.size() - 1) {
55 }
else if (
name[rbracket + 1] ==
':') {
57 *
port =
name.substr(rbracket + 2,
name.size() - rbracket - 2);
63 *host =
name.substr(1, rbracket - 1);
71 size_t colon =
name.find(
':');
75 *host =
name.substr(0, colon);
91 return DoSplitHostPort(
name, host,
port, &unused);
101 const bool ret = DoSplitHostPort(
name, &host_view, &port_view, &has_port);
ABSL_MUST_USE_RESULT std::string StrFormat(const FormatSpec< Args... > &format, const Args &... args)
#define GPR_DEBUG_ASSERT(x)
size_type find(string_view s, size_type pos=0) const noexcept
bool SplitHostPort(absl::string_view name, absl::string_view *host, absl::string_view *port)
std::string JoinHostPort(absl::string_view host, int port)
size_type rfind(string_view s, size_type pos=npos) const noexcept
UniquePtr< SSL_SESSION > ret
absl::string_view string_view
constexpr bool empty() const noexcept
static constexpr size_type npos
grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:01