diff options
| author | babenko <[email protected]> | 2026-06-28 19:27:41 +0300 |
|---|---|---|
| committer | babenko <[email protected]> | 2026-06-28 19:51:54 +0300 |
| commit | f3e7096029d090b57fc6c818f541c02834642cc4 (patch) | |
| tree | 8673195741e83de9e32b682d4dad9b4470190abb /library/cpp/yt/string/string.h | |
| parent | 9e0fa46738a757b1e764f3d1bc51ef3cc6ed7f6d (diff) | |
YT-22593: Add AsciiStringToLower/AsciiStringToUpper
commit_hash:106e53bffa668818abf8e4003d694e1eb0a0316f
Diffstat (limited to 'library/cpp/yt/string/string.h')
| -rw-r--r-- | library/cpp/yt/string/string.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/library/cpp/yt/string/string.h b/library/cpp/yt/string/string.h index 346ec04ef4d..968ac3a0554 100644 --- a/library/cpp/yt/string/string.h +++ b/library/cpp/yt/string/string.h @@ -148,6 +148,15 @@ TString UnderscoreCaseToCamelCase(TStringBuf str); void CamelCaseToUnderscoreCase(TStringBuilderBase* builder, TStringBuf str); TString CamelCaseToUnderscoreCase(TStringBuf str); +//! ASCII case conversion returning |std::string|. +//! TODO(babenko): likely a temporary workaround; these exist only because util's +//! |to_lower|/|to_upper| are |TString|-based (forcing a |TString| round-trip for +//! |std::string| callers). Drop once util gains |std::string| support. +//! Returns a copy of |value| with every ASCII letter lowercased; non-ASCII bytes are left intact. +std::string AsciiStringToLower(TStringBuf value); +//! Returns a copy of |value| with every ASCII letter uppercased; non-ASCII bytes are left intact. +std::string AsciiStringToUpper(TStringBuf value); + [[nodiscard]] TStringBuf TrimLeadingWhitespaces(TStringBuf str Y_LIFETIME_BOUND); [[nodiscard]] TStringBuf Trim(TStringBuf str Y_LIFETIME_BOUND, TStringBuf whitespaces = " "); |
