MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / parse_precision

Function parse_precision

extlibs/fmt/include/fmt/format.h:2473–2492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2471
2472template <typename Char, typename Handler>
2473FMT_CONSTEXPR const Char* parse_precision(const Char* begin, const Char* end,
2474 Handler&& handler) {
2475 ++begin;
2476 auto c = begin != end ? *begin : Char();
2477 if ('0' <= c && c <= '9') {
2478 handler.on_precision(parse_nonnegative_int(begin, end, handler));
2479 } else if (c == '{') {
2480 ++begin;
2481 if (begin != end) {
2482 begin =
2483 parse_arg_id(begin, end, precision_adapter<Handler, Char>(handler));
2484 }
2485 if (begin == end || *begin++ != '}')
2486 return handler.on_error("invalid format string"), begin;
2487 } else {
2488 return handler.on_error("missing precision specifier"), begin;
2489 }
2490 handler.end_precision();
2491 return begin;
2492}
2493
2494// Parses standard format specifiers and sends notifications about parsed
2495// components to handler.

Callers 2

do_parseMethod · 0.85
parse_format_specsFunction · 0.85

Calls 5

parse_nonnegative_intFunction · 0.85
parse_arg_idFunction · 0.85
on_precisionMethod · 0.45
on_errorMethod · 0.45
end_precisionMethod · 0.45

Tested by

no test coverage detected