Go to the documentation of this file.
15 #include "absl/strings/substitute.h"
19 #include "absl/base/internal/raw_logging.h"
20 #include "absl/strings/ascii.h"
21 #include "absl/strings/escaping.h"
22 #include "absl/strings/internal/resize_uninitialized.h"
23 #include "absl/strings/string_view.h"
27 namespace substitute_internal {
34 for (
size_t i = 0;
i <
format.size();
i++) {
39 "Invalid absl::Substitute() format string: \"%s\".",
45 if (
static_cast<size_t>(
index) >= num_args) {
49 "Invalid absl::Substitute() format string: asked for \"$"
50 "%d\", but only %d args were given. Full format string was: "
58 }
else if (
format[
i + 1] ==
'$') {
64 "Invalid absl::Substitute() format string: \"%s\".",
74 if (
size == 0)
return;
77 size_t original_size =
output->size();
79 original_size +
size);
80 char*
target = &(*output)[original_size];
81 for (
size_t i = 0;
i <
format.size();
i++) {
87 }
else if (
format[
i + 1] ==
'$') {
101 "fix sizeof(scratch_)");
102 if (
value ==
nullptr) {
125 }
while (
value != 0);
130 std::fill_n(beg,
writer - beg,
hex.fill);
142 char*
const minfill =
end - dec.
width;
153 ptrdiff_t fillers =
writer - minfill;
157 bool add_sign_again =
false;
158 if (neg && dec.
fill ==
'0') {
160 add_sign_again =
true;
164 if (add_sign_again) *--
writer =
'-';
static int copy(grpc_slice_buffer *input, grpc_slice_buffer *output)
void STLStringResizeUninitializedAmortized(string_type *s, size_t new_size)
std::string CEscape(absl::string_view src)
#define ABSL_NAMESPACE_END
#define ABSL_NAMESPACE_BEGIN
constexpr size_type size() const noexcept
def c_str(s, encoding='ascii')
unsigned __int64 uint64_t
constexpr const_iterator begin() const noexcept
void SubstituteAndAppendArray(std::string *output, absl::string_view format, const absl::string_view *args_array, size_t num_args)
char scratch_[numbers_internal::kFastToBufferSize]
_W64 unsigned int uintptr_t
absl::string_view string_view
ABSL_CONST_INIT const ABSL_DLL char kHexChar[]
static const int kFastToBufferSize
bool ascii_isdigit(unsigned char c)
constexpr const_iterator end() const noexcept
#define ABSL_RAW_LOG(severity,...)
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:23