aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/string/string.cpp
diff options
context:
space:
mode:
authorarkady-e1ppa <arkady-e1ppa@yandex-team.com>2024-12-25 10:19:49 +0300
committerarkady-e1ppa <arkady-e1ppa@yandex-team.com>2024-12-25 11:15:51 +0300
commit47a8704130b3d47dcb4eb806c3eae41292e90eb4 (patch)
tree2071f3873a5a8063affe776e4b83866ab997b1a2 /library/cpp/yt/string/string.cpp
parent2f83984f3c96794039f6d577c2dc3eea220dbca0 (diff)
downloadydb-47a8704130b3d47dcb4eb806c3eae41292e90eb4.tar.gz
YT-21233: Issues and tidying up of rXXXXXX
commit_hash:19481c9fbb008aab4f4d676f1a3a242f6e90e90e
Diffstat (limited to 'library/cpp/yt/string/string.cpp')
-rw-r--r--library/cpp/yt/string/string.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/cpp/yt/string/string.cpp b/library/cpp/yt/string/string.cpp
index 3cf5651e23..b9c3236134 100644
--- a/library/cpp/yt/string/string.cpp
+++ b/library/cpp/yt/string/string.cpp
@@ -362,7 +362,8 @@ TStringBuf FormatBool(bool value)
void TruncateStringInplace(TString* string, int lengthLimit, TStringBuf truncatedSuffix)
{
if (std::ssize(*string) > lengthLimit) {
- *string = Format("%v%v", string->substr(0, lengthLimit), truncatedSuffix);
+ string->resize(lengthLimit);
+ string->append(truncatedSuffix);
}
}