16 #ifndef ABSL_STRINGS_INTERNAL_STR_FORMAT_EXTENSION_H_ 17 #define ABSL_STRINGS_INTERNAL_STR_FORMAT_EXTENSION_H_ 75 auto raw_append = [&](
size_t count) {
76 memset(pos_, c, count);
98 memcpy(pos_, v.
data(),
n);
105 bool PutPaddedString(
string_view v,
int w,
int p,
bool l);
107 template <
typename T>
112 template <
typename T>
118 size_t Avail()
const {
return buf_ +
sizeof(buf_) - pos_; }
142 h, hh, l, ll, L, j,
z, t, q, none
144 static const size_t kNumValues = none + 1;
158 const Spec& spec = kSpecs[
id_];
165 return a.
id() == b.
id();
171 return os << v.
name();
188 #define ABSL_CONVERSION_CHARS_EXPAND_(X_VAL, X_SEP) \ 190 X_VAL(c) X_SEP X_VAL(C) X_SEP X_VAL(s) X_SEP X_VAL(S) X_SEP \ 192 X_VAL(d) X_SEP X_VAL(i) X_SEP X_VAL(o) X_SEP \ 193 X_VAL(u) X_SEP X_VAL(x) X_SEP X_VAL(X) X_SEP \ 195 X_VAL(f) X_SEP X_VAL(F) X_SEP X_VAL(e) X_SEP X_VAL(E) X_SEP \ 196 X_VAL(g) X_SEP X_VAL(G) X_SEP X_VAL(a) X_SEP X_VAL(A) X_SEP \ 198 X_VAL(n) X_SEP X_VAL(p) 206 f, F, e, E, g,
G,
a, A,
210 static const size_t kNumValues = none + 1;
226 out_id = ConversionChar::id; \ 241 case x:
case X:
case a:
case A:
case p:
return 16;
249 case X:
case F:
case E:
case G:
case A:
return true;
250 default:
return false;
256 case d:
case i:
return true;
257 default:
return false;
263 case d:
case i:
case u:
case o:
case x:
case X:
265 default:
return false;
271 case a:
case e:
case f:
case g:
case A:
case E:
case F:
case G:
273 default:
return false;
280 char Char()
const {
return kSpecs[
id_].name; }
283 return a.
id() == b.
id();
319 int width()
const {
return width_; }
341 #define CONV_SET_CASE(c) \ 342 conv == #c[0] ? (uint64_t{1} << (1 + ConversionChar::Id::c)): 351 #define CONV_SET_CASE(c) c = ConversionCharToConvValue(#c[0]), 360 floating =
a | e | f | g | A | E | F | G,
372 return Conv(static_cast<uint64_t>(a) | static_cast<uint64_t>(b));
387 return (static_cast<uint64_t>(
set) & static_cast<uint64_t>(c)) ==
388 static_cast<uint64_t
>(c);
403 inline size_t Excess(
size_t used,
size_t capacity) {
404 return used < capacity ? capacity - used : 0;
411 #endif // ABSL_STRINGS_INTERNAL_STR_FORMAT_EXTENSION_H_
#define ABSL_CONVERSION_CHARS_EXPAND_(X_VAL, X_SEP)
constexpr size_type size() const noexcept
constexpr const_pointer data() const noexcept