From 0b6f0003e4bced9d04da8d6d240da7f77877f538 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Thu, 30 Mar 2023 13:15:38 -0700 Subject: Clarify code comment to avoid confusion. PiperOrigin-RevId: 520724148 Change-Id: Ia90c4a711649e89454bc2ca0a9d0d771d56e79c0 --- absl/strings/str_format.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'absl/strings') 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: -- cgit v1.2.3