FastLED 3.9.15
Loading...
Searching...
No Matches

◆ format_impl() [2/2]

template<typename T, typename... Args>
void fl::printf_detail::format_impl ( sstream & stream,
const char * format,
const T & first,
const Args &... rest )

Definition at line 586 of file stdio.h.

586 {
587 while (*format) {
588 if (*format == '%') {
590 if (spec.type == '%') {
591 stream << "%";
592 continue;
593 } else {
594 // Format the first argument and continue with the rest
595 format_arg(stream, spec, first);
596 format_impl(stream, format, rest...);
597 return;
598 }
599 } else {
600 // Create a single-character string since sstream treats char as number
601 char temp_str[2] = {*format, '\0'};
602 stream << temp_str;
603 ++format;
604 }
605 }
606
607 // If we get here, there are unused arguments
608 // This is not an error in printf, so we just ignore them
609}
fl::enable_if<!fl::is_pointer< T >::value >::type format_arg(sstream &stream, const FormatSpec &spec, const T &arg) FL_NOEXCEPT
Definition stdio.h:364
FormatSpec parse_format_spec(const char *&format) FL_NOEXCEPT
Definition stdio.h:109
void format_impl(sstream &stream, const char *format) FL_NOEXCEPT
Definition stdio.h:563
fl::string format(const char *fmt)
Format with no arguments.
Definition format.h:439

References FL_NOEXCEPT, fl::format(), format_arg(), format_impl(), parse_format_spec(), and fl::printf_detail::FormatSpec::type.

+ Here is the call graph for this function: