diff options
author | melkov <melkov@yandex-team.ru> | 2022-02-10 16:48:13 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:13 +0300 |
commit | 438546c8737d5c1fdeb31157dcf999717d930eec (patch) | |
tree | d29d229abd2f9f889b9b7eb148d635059dc26acf /util/string/split.h | |
parent | 96647fad5355ff5ef45a00a6d85c097028584ab0 (diff) | |
download | ydb-438546c8737d5c1fdeb31157dcf999717d930eec.tar.gz |
Restoring authorship annotation for <melkov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/string/split.h')
-rw-r--r-- | util/string/split.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/util/string/split.h b/util/string/split.h index bc46d9e64c6..50aa32210ec 100644 --- a/util/string/split.h +++ b/util/string/split.h @@ -408,21 +408,21 @@ static inline void Split(char* buf, char ch, T* res) { } /// Split string into res vector. Res vector is cleared before split. -/// Old good slow split function. -/// Field delimter is any number of symbols specified in delim (no empty strings in res vector) +/// Old good slow split function. +/// Field delimter is any number of symbols specified in delim (no empty strings in res vector) /// @return number of elements created size_t Split(const char* in, const char* delim, TVector<TString>& res); size_t Split(const TString& in, const TString& delim, TVector<TString>& res); - -/// Old split reimplemented for TStringBuf using the new code -/// Note that delim can be constructed from char* automatically (it is not cheap though) + +/// Old split reimplemented for TStringBuf using the new code +/// Note that delim can be constructed from char* automatically (it is not cheap though) inline size_t Split(const TStringBuf s, const TSetDelimiter<const char>& delim, TVector<TStringBuf>& res) { - res.clear(); + res.clear(); TContainerConsumer<TVector<TStringBuf>> res1(&res); TSkipEmptyTokens<TContainerConsumer<TVector<TStringBuf>>> consumer(&res1); SplitString(s.data(), s.data() + s.size(), delim, consumer); - return res.size(); -} + return res.size(); +} template <class P, class D> void GetNext(TStringBuf& s, D delim, P& param) { |