diff options
author | myltsev <myltsev@yandex-team.ru> | 2022-02-10 16:46:03 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:03 +0300 |
commit | 9166d66c30c23c9e85a7c88185a068987148d23f (patch) | |
tree | 421bdcec5755d9e441c485560aab5ab8d74c7475 /library/cpp/string_utils/ztstrbuf/ztstrbuf.h | |
parent | 8d3a5ed3a188a34167eaee54f1691ce5c9edf2f3 (diff) | |
download | ydb-9166d66c30c23c9e85a7c88185a068987148d23f.tar.gz |
Restoring authorship annotation for <myltsev@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/string_utils/ztstrbuf/ztstrbuf.h')
-rw-r--r-- | library/cpp/string_utils/ztstrbuf/ztstrbuf.h | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/library/cpp/string_utils/ztstrbuf/ztstrbuf.h b/library/cpp/string_utils/ztstrbuf/ztstrbuf.h index 5fab768d8c..04c509bcc5 100644 --- a/library/cpp/string_utils/ztstrbuf/ztstrbuf.h +++ b/library/cpp/string_utils/ztstrbuf/ztstrbuf.h @@ -1,36 +1,36 @@ -#pragma once - -#include <util/generic/strbuf.h> +#pragma once + +#include <util/generic/strbuf.h> #include <util/generic/string.h> - -/* - * Zero-terminated string view. - * - * Has a c_str() for use with system/cstdlib calls (like TString) - * but can be constructed from a string literal or command-line arg - * without memory allocation (like TStringBuf). - * - * Use it to reference filenames, thread names, string formats etc. - */ - -class TZtStringBuf: public TStringBuf { -public: - TZtStringBuf(const char* s) - : TStringBuf(s) - { - } - - TZtStringBuf(const TString& s) - : TStringBuf(s) - { - } - - TZtStringBuf() - : TZtStringBuf(TString{}) - { - } - - const char* c_str() const { - return data(); - } -}; + +/* + * Zero-terminated string view. + * + * Has a c_str() for use with system/cstdlib calls (like TString) + * but can be constructed from a string literal or command-line arg + * without memory allocation (like TStringBuf). + * + * Use it to reference filenames, thread names, string formats etc. + */ + +class TZtStringBuf: public TStringBuf { +public: + TZtStringBuf(const char* s) + : TStringBuf(s) + { + } + + TZtStringBuf(const TString& s) + : TStringBuf(s) + { + } + + TZtStringBuf() + : TZtStringBuf(TString{}) + { + } + + const char* c_str() const { + return data(); + } +}; |