Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
format.hpp File Reference

Minimal safe string formatting for embedded systems. More...

Detailed Description

Minimal safe string formatting for embedded systems.

Provides basic printf-style formatting optimized for embedded use:

  • d, i: signed integer
  • u: unsigned integer
  • x, X: hex (lower/upper)
  • s: string
  • c: character
  • f: float (fixed precision, no scientific notation)
  • %%: literal percent

No dynamic allocation. Fixed buffer output.

Definition in file format.hpp.

#include <cstdint>
#include <cstddef>
#include <cstdarg>

Go to the source code of this file.

Namespaces

namespace  sbl
 Root namespace for all Sound Byte Libs code.
 
namespace  sbl::log
 Logging.
 

Functions

int sbl::log::vformat (char *buf, size_t size, const char *fmt, va_list args)
 Format a string into a buffer (vsnprintf-style)
 
int sbl::log::format (char *buf, size_t size, const char *fmt,...)
 Format a string into a buffer (snprintf-style)