Skip to content

ST::printf

Michael Hansen edited this page Nov 20, 2019 · 3 revisions

ST::printf

Headers

#include <string_theory/stdio>

Public Functions

Name Summary
ST::printf Write formatted output to stdout or a C-style FILE * object

Function Documentation

ST::printf

Signature
template <typename... args_T>
void ST::printf(const char *fmt_str, args_T ...args)

template <typename... args_T>
void ST::printf(const char *fmt_str, args_T &&...args)
(1)
template <typename... args_T>
void ST::printf(FILE *out_file, const char *fmt_str, args_T ...args)

template <typename... args_T>
void ST::printf(FILE *out_file, const char *fmt_str, args_T &&...args)
(2)
  1. Writes formatted text to the C stdout stream.
  2. Writes formatted text to the C FILE stream out_file.

These both use the formatting rules defined in the Format String Reference guide, rather than classic C-style printf formatting.

Changed in 3.0: The arguments in args are now forwarded to reduce copying.

Clone this wiki locally