MCPcopy Create free account
hub / github.com/fmtlib/fmt / parse_flags

Function parse_flags

include/fmt/printf.h:314–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312
313template <typename Char>
314void parse_flags(format_specs& specs, const Char*& it, const Char* end) {
315 for (; it != end; ++it) {
316 switch (*it) {
317 case '-': specs.set_align(align::left); break;
318 case '+': specs.set_sign(sign::plus); break;
319 case '0': specs.set_fill('0'); break;
320 case ' ':
321 if (specs.sign() != sign::plus) specs.set_sign(sign::space);
322 break;
323 case '#': specs.set_alt(); break;
324 default: return;
325 }
326 }
327}
328
329template <typename Char, typename GetArg>
330auto parse_header(const Char*& it, const Char* end, format_specs& specs,

Callers 1

parse_headerFunction · 0.85

Calls 5

set_alignMethod · 0.80
set_signMethod · 0.80
set_fillMethod · 0.80
signMethod · 0.80
set_altMethod · 0.80

Tested by

no test coverage detected