diff options
author | babenko <babenko@yandex-team.com> | 2022-08-26 10:04:55 +0300 |
---|---|---|
committer | babenko <babenko@yandex-team.com> | 2022-08-26 10:04:55 +0300 |
commit | af6b0b93037268a9ca1343dd09629cf910c944d9 (patch) | |
tree | 609b08bbb2cd7498d55b6f7a92aaf1a4d51d003c /library/cpp/yt/string/string.h | |
parent | d40e0a72d30643f29b6fe0dee30d6d686f563e3f (diff) | |
download | ydb-af6b0b93037268a9ca1343dd09629cf910c944d9.tar.gz |
Natively support %x and %X in Format
Diffstat (limited to 'library/cpp/yt/string/string.h')
-rw-r--r-- | library/cpp/yt/string/string.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/library/cpp/yt/string/string.h b/library/cpp/yt/string/string.h index ae6c99caab..04eb115cb2 100644 --- a/library/cpp/yt/string/string.h +++ b/library/cpp/yt/string/string.h @@ -36,7 +36,8 @@ static constexpr TStringBuf DefaultRangeEllipsisFormat = "..."; // ASCII characters from 0x20 = ' ' to 0x7e = '~' are printable. static constexpr char PrintableASCIILow = 0x20; static constexpr char PrintableASCIIHigh = 0x7e; -static constexpr TStringBuf Int2Hex = "0123456789abcdef"; +static constexpr TStringBuf IntToHexLowercase = "0123456789abcdef"; +static constexpr TStringBuf IntToHexUppercase = "0123456789ABCDEF"; //! Joins a range of items into a string intermixing them with the delimiter. /*! @@ -196,7 +197,11 @@ TString Trim(const TString& str, const TString& whitespaces); //! Implemented for |[u]i(32|64)|. template <class T> -char* WriteIntToBufferBackwards(char* ptr, T value); +char* WriteDecIntToBufferBackwards(char* ptr, T value); + +//! Implemented for |[u]i(32|64)|. +template <class T> +char* WriteHexIntToBufferBackwards(char* ptr, T value, bool uppercase); //////////////////////////////////////////////////////////////////////////////// |