Console I/O Library

#include <std/io.pat>
This namespace contains general utility functions.


Functions

std::print(str format, auto args...)

Formats and outputs a set of values to the built-in console

This function works identical to libfmt’s fmt::print() and C++20’s std::print(). Please check its documentation for further informatiom

Parameter

Description

format

A libfmt / C++20 std::format format string

args...

A list of arguments to be inserted into the format string

std::print("Hello {} {}", "World", 42); // Prints "Hello World 42"

std::format(str format, auto args...) -> str

Formats a set of values and returns the result as a string

This function works identical to libfmt’s fmt::format() and C++20’s std::format(). Please check its documentation for further informatiom

Parameter

Description

format

A libfmt / C++20 std::format format string

args...

A list of arguments to be inserted into the format string

return

Formatted string

return std::format("Hello {} {}", "World", 42); // Returns "Hello World 42"