MCPcopy Create free account
hub / github.com/ablab/spades / parse_header

Method parse_header

ext/src/cppformat/format.cc:687–718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

685
686template <typename Char>
687unsigned fmt::internal::PrintfFormatter<Char>::parse_header(
688 const Char *&s, FormatSpec &spec) {
689 unsigned arg_index = UINT_MAX;
690 Char c = *s;
691 if (c >= '0' && c <= '9') {
692 // Parse an argument index (if followed by '$') or a width possibly
693 // preceded with '0' flag(s).
694 unsigned value = parse_nonnegative_int(s);
695 if (*s == '$') { // value is an argument index
696 ++s;
697 arg_index = value;
698 } else {
699 if (c == '0')
700 spec.fill_ = '0';
701 if (value != 0) {
702 // Nonzero value means that we parsed width and don't need to
703 // parse it or flags again, so return now.
704 spec.width_ = value;
705 return arg_index;
706 }
707 }
708 }
709 parse_flags(spec, s);
710 // Parse width.
711 if (*s >= '0' && *s <= '9') {
712 spec.width_ = parse_nonnegative_int(s);
713 } else if (*s == '*') {
714 ++s;
715 spec.width_ = WidthHandler(spec).visit(get_arg(s));
716 }
717 return arg_index;
718}
719
720template <typename Char>
721void fmt::internal::PrintfFormatter<Char>::format(

Callers 5

sqascii_ReadFunction · 0.80
sqascii_ReadInfoFunction · 0.80
sqascii_ReadWindowFunction · 0.80
sqascii_FetchSubseqFunction · 0.80
esl_sqascii_ParseFunction · 0.80

Calls 3

parse_nonnegative_intFunction · 0.85
WidthHandlerClass · 0.85
visitMethod · 0.45

Tested by

no test coverage detected