diff options
-rw-r--r-- | absl/strings/internal/stringify_sink.h | 2 | ||||
-rw-r--r-- | absl/strings/str_cat.cc | 24 |
2 files changed, 0 insertions, 26 deletions
diff --git a/absl/strings/internal/stringify_sink.h b/absl/strings/internal/stringify_sink.h index a83f70e4..5e326a0b 100644 --- a/absl/strings/internal/stringify_sink.h +++ b/absl/strings/internal/stringify_sink.h @@ -31,8 +31,6 @@ class StringifySink { void Append(string_view v); - bool PutPaddedString(string_view v, int width, int precision, bool left); - // Support `absl::Format(&sink, format, args...)`. friend void AbslFormatFlush(StringifySink* sink, absl::string_view v) { sink->Append(v); diff --git a/absl/strings/str_cat.cc b/absl/strings/str_cat.cc index 6981347a..21819203 100644 --- a/absl/strings/str_cat.cc +++ b/absl/strings/str_cat.cc @@ -37,30 +37,6 @@ void StringifySink::Append(string_view v) { buffer_.append(v.data(), v.size()); } -bool StringifySink::PutPaddedString(string_view v, int width, int precision, - bool left) { - size_t space_remaining = 0; - - if (width >= 0) space_remaining = static_cast<size_t>(width); - - size_t n = v.size(); - - if (precision >= 0) n = (std::min)(n, static_cast<size_t>(precision)); - - string_view shown(v.data(), n); - - if (shown.size() < space_remaining) { - space_remaining = space_remaining - shown.size(); - } else { - space_remaining = 0; - } - - if (!left) Append(space_remaining, ' '); - Append(shown); - if (left) Append(space_remaining, ' '); - return true; -} - } // namespace strings_internal AlphaNum::AlphaNum(Hex hex) { |