aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/tld/tld.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:15 +0300
commit72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch)
treeda2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/tld/tld.h
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/tld/tld.h')
-rw-r--r--library/cpp/tld/tld.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/library/cpp/tld/tld.h b/library/cpp/tld/tld.h
index 9e241de090..4829b7bea6 100644
--- a/library/cpp/tld/tld.h
+++ b/library/cpp/tld/tld.h
@@ -3,26 +3,26 @@
#include <util/generic/strbuf.h>
namespace NTld {
- const char* const* GetTlds();
+ const char* const* GetTlds();
- // Note that FindTld() returns empty string when @host is single domain label (without '.').
+ // 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();
- }
+ 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);
+ bool IsTld(const TStringBuf& tld);
- inline bool InTld(const TStringBuf& host) {
- return IsTld(FindTld(host));
- }
+ inline bool InTld(const TStringBuf& host) {
+ return IsTld(FindTld(host));
+ }
- // check if @s belongs to a "good" subset of reliable TLDs, defined in tld.cpp
- bool IsVeryGoodTld(const TStringBuf& tld);
+ // check if @s belongs to a "good" subset of reliable TLDs, defined in tld.cpp
+ bool IsVeryGoodTld(const TStringBuf& tld);
- inline bool InVeryGoodTld(const TStringBuf& host) {
- return IsVeryGoodTld(FindTld(host));
- }
+ inline bool InVeryGoodTld(const TStringBuf& host) {
+ return IsVeryGoodTld(FindTld(host));
+ }
}