bool AlibabaCloud::PDS::IsValidEndpoint()

in sdk/src/utils/Utils.cc [655:674]


bool AlibabaCloud::PDS::IsValidEndpoint(const std::string &value)
{
    auto host = Url(value).host();

    if (host.empty())
        return false;

    for (const auto c : host) {
        if (!((c >= 'a' && c <= 'z') ||
            (c >= '0' && c <= '9') ||
            (c >= 'A' && c <= 'Z') ||
            (c == '_') ||
            (c == '-') ||
            (c == '.'))) {
            return false;
        }
    }

    return true;
}