MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / parse_format_string

Function parse_format_string

external/fmt/include/fmt/base.h:1630–1647  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1628
1629template <typename Char, typename Handler>
1630FMT_CONSTEXPR void parse_format_string(basic_string_view<Char> fmt,
1631 Handler&& handler) {
1632 auto begin = fmt.data(), end = begin + fmt.size();
1633 auto p = begin;
1634 while (p != end) {
1635 auto c = *p++;
1636 if (c == '{') {
1637 handler.on_text(begin, p - 1);
1638 begin = p = parse_replacement_field(p - 1, end, handler);
1639 } else if (c == '}') {
1640 if (p == end || *p != '}')
1641 return handler.on_error("unmatched '}' in format string");
1642 handler.on_text(begin, p);
1643 begin = ++p;
1644 }
1645 }
1646 handler.on_text(begin, end);
1647}
1648
1649// Checks char specs and returns true iff the presentation type is char-like.
1650FMT_CONSTEXPR inline auto check_char_specs(const format_specs& specs) -> bool {

Callers 6

parse_stringFunction · 0.85
vscanFunction · 0.85
vformat_toFunction · 0.85
vformat_toMethod · 0.85
strFunction · 0.85
str_Method · 0.85

Calls 5

parse_replacement_fieldFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45
on_textMethod · 0.45
on_errorMethod · 0.45

Tested by 2

parse_stringFunction · 0.68
vscanFunction · 0.68