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

◆ printf()

template<typename... Args>
void fl::printf ( const char * format,
const Args &... args )

Printf-like formatting function that prints directly to the platform output.

Parameters
formatFormat string with placeholders like "%d", "%s", "%f" etc.
argsArguments to format

Supported format specifiers:

  • d, i: integers (all integral types)
  • u: unsigned integers
  • o: octal integers
  • f: floating point numbers
  • s: strings (const char*, fl::string)
  • c: characters
  • x: hexadecimal (lowercase)
  • X: hexadecimal (uppercase)
  • p: pointers (formatted as 0x... hex)
  • %%: literal % character

Example usage:

fl::printf("Value: %d, Name: %s", 42, "test");
fl::printf("Float: %.2f", 3.14159);
int* ptr = &value;
fl::printf("Pointer: %p", ptr);
constexpr int type_rank< T >::value
void printf(const char *format, const Args &... args) FL_NOEXCEPT
Printf-like formatting function that prints directly to the platform output.
Definition stdio.h:635
Parameters
formatFormat string with placeholders like "%d", "%s", "%f" etc.
argsArguments to format

Supported format specifiers:

  • d, i: integers (all integral types)
  • u: unsigned integers
  • o: octal integers
  • f: floating point numbers
  • s: strings (const char*, fl::string)
  • c: characters
  • x: hexadecimal (lowercase)
  • X: hexadecimal (uppercase)
  • p: pointers (formatted as 0x... hex)
  • %%: literal % character

Example usage:

fl::printf("Value: %d, Name: %s", 42, "test");
fl::printf("Float: %.2f", 3.14159);
Examples
Chromancer.ino.

Definition at line 635 of file stdio.h.

635 {
636 sstream stream;
638 fl::print(stream.str().c_str());
639}
const char * c_str() const FL_NOEXCEPT
string str() const FL_NOEXCEPT
Definition strstream.h:43
void format_impl(sstream &stream, const char *format) FL_NOEXCEPT
Definition stdio.h:563
void print(const char *str)
fl::string format(const char *fmt)
Format with no arguments.
Definition format.h:439
corkscrew_args args
Definition old.h:149

References args, fl::basic_string::c_str(), FL_NOEXCEPT, format(), fl::printf_detail::format_impl(), print(), and fl::sstream::str().

Referenced by fl::test::DefaultReporter::assertResult(), fl::test::TestContext::checkTimeout(), fl::test::fail(), handleClientResponse(), handleResponse(), fl::test::TestContext::listTests(), fl::third_party::MP3Decode(), fl::test::outputCapture(), fl::test::outputMessage(), fl::test::SerialReporter::print(), sendAsyncRequest(), sendAsyncStreamRequest(), sendSyncRequest(), setup(), fl::test::skipTest(), fl::test::DefaultReporter::subcaseStart(), fl::test::DefaultReporter::testCaseEnd(), fl::test::DefaultReporter::testCaseStart(), fl::test::DefaultReporter::testRunEnd(), and fl::test::DefaultReporter::testRunStart().

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