summaryrefslogtreecommitdiff
path: root/absl/strings
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2023-03-30 13:15:38 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-03-30 13:16:23 -0700
commit0b6f0003e4bced9d04da8d6d240da7f77877f538 (patch)
tree132928f4263f4719bde264b6ddd9b7eae088b650 /absl/strings
parentd79361faf639618b501312a5dcdefeaa5bbadfd8 (diff)
Clarify code comment to avoid confusion.
PiperOrigin-RevId: 520724148 Change-Id: Ia90c4a711649e89454bc2ca0a9d0d771d56e79c0
Diffstat (limited to 'absl/strings')
-rw-r--r--absl/strings/str_format.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/absl/strings/str_format.h b/absl/strings/str_format.h
index 3536b70e..fc4bf39e 100644
--- a/absl/strings/str_format.h
+++ b/absl/strings/str_format.h
@@ -36,10 +36,12 @@
// * `absl::StreamFormat()` to more efficiently write a format string to a
// stream, such as`std::cout`.
// * `absl::PrintF()`, `absl::FPrintF()` and `absl::SNPrintF()` as
-// replacements for `std::printf()`, `std::fprintf()` and `std::snprintf()`.
+// drop-in replacements for `std::printf()`, `std::fprintf()` and
+// `std::snprintf()`.
//
-// Note: a version of `std::sprintf()` is not supported as it is
-// generally unsafe due to buffer overflows.
+// Note: An `absl::SPrintF()` drop-in replacement is not supported as it
+// is generally unsafe due to buffer overflows. Use `absl::StrFormat` which
+// returns the string as output instead of expecting a pre-allocated buffer.
//
// Additionally, you can provide a format string (and its associated arguments)
// using one of the following abstractions: