FastLED 3.10.6
Loading...
Searching...
No Matches

◆ format_impl() [1/2]

void fl::printf_detail::format_impl ( sstream & stream,
const char * format )
inline

Definition at line 855 of file stdio.h.

855 {
856 while (*format) {
857 if (*format == '%') {
859 if (spec.type == '%') {
860 stream << "%";
861 continue;
862 } else {
863 // No argument for format specifier
864 stream << "<missing_arg>";
865 continue;
866 }
867 } else if (*format == '{' || *format == '}') {
868 if (parse_brace(stream, format)) {
869 // Generic placeholder with no argument left to consume.
870 stream << "<missing_arg>";
871 }
872 continue;
873 } else {
874 // Create a single-character string since sstream treats char as number
875 char temp_str[2] = {*format, '\0'};
876 stream << temp_str;
877 ++format;
878 }
879 }
880}
FormatSpec parse_format_spec(const char *&format) FL_NO_EXCEPT
Definition stdio.h:130
bool parse_brace(sstream &stream, const char *&format) FL_NO_EXCEPT
Definition stdio.h:821
fl::string format(const char *fmt)
Format with no arguments.
Definition format.h:439

References fl::FL_NO_EXCEPT, fl::format(), parse_brace(), parse_format_spec(), and fl::printf_detail::FormatSpec::type.

Referenced by format_impl(), fl::printf(), and fl::snprintf().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: