diff options
author | andr-savel <andr-savel@yandex-team.ru> | 2022-02-10 16:52:05 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:52:05 +0300 |
commit | 6dfdbbfba2b329639d9f07db609f9bdba66ab5e4 (patch) | |
tree | b4520dfb717d428bee63dc7991faa80a5edf69d6 /util | |
parent | 876fccb9bb35c399294d4446e09a10d9ec9aff8f (diff) | |
download | ydb-6dfdbbfba2b329639d9f07db609f9bdba66ab5e4.tar.gz |
Restoring authorship annotation for <andr-savel@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util')
-rw-r--r-- | util/string/split.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/util/string/split.h b/util/string/split.h index bc46d9e64c..46530b14b5 100644 --- a/util/string/split.h +++ b/util/string/split.h @@ -175,26 +175,26 @@ struct TCharDelimiter { }; template <class Iterator, class Condition> -struct TFuncDelimiter { -public: +struct TFuncDelimiter { +public: template <class... Args> TFuncDelimiter(Args&&... args) : Fn(std::forward<Args>(args)...) - { - } - + { + } + inline Iterator Find(Iterator& b, Iterator e) const noexcept { - if ((b = std::find_if(b, e, Fn)) != e) { - return b++; - } - - return b; - } - -private: + if ((b = std::find_if(b, e, Fn)) != e) { + return b++; + } + + return b; + } + +private: Condition Fn; -}; - +}; + template <class Char> struct TFindFirstOf { inline TFindFirstOf(Char* set) |