aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/tld/tld.h
diff options
context:
space:
mode:
authorabolkhovityanov <abolkhovityanov@yandex-team.ru>2022-02-10 16:50:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:49 +0300
commit812751ae6997d4a9efaca424ef7b2e1d06fa3771 (patch)
tree3bdff9442b38b433a98640c47522ba7c66bed0d1 /library/cpp/tld/tld.h
parent90e989b502f29f2d1176402f08e85953ae199004 (diff)
downloadydb-812751ae6997d4a9efaca424ef7b2e1d06fa3771.tar.gz
Restoring authorship annotation for <abolkhovityanov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/tld/tld.h')
-rw-r--r--library/cpp/tld/tld.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/tld/tld.h b/library/cpp/tld/tld.h
index 9e241de090b..7b7c8c2fc20 100644
--- a/library/cpp/tld/tld.h
+++ b/library/cpp/tld/tld.h
@@ -1,19 +1,19 @@
-#pragma once
-
-#include <util/generic/strbuf.h>
-
-namespace NTld {
+#pragma once
+
+#include <util/generic/strbuf.h>
+
+namespace NTld {
const char* const* GetTlds();
-
+
// Note that FindTld() returns empty string when @host is single domain label (without '.').
// If you need whole @host for such case, you can use GetZone() from library/cpp/string_utils/url/url.h
inline TStringBuf FindTld(const TStringBuf& host) {
size_t p = host.rfind('.');
return p != TStringBuf::npos ? host.SubStr(p + 1) : TStringBuf();
}
-
+
bool IsTld(const TStringBuf& tld);
-
+
inline bool InTld(const TStringBuf& host) {
return IsTld(FindTld(host));
}