Ookii.CommandLine for C++  2.0.0
Functions
ookii::format Namespace Reference

Namespace containing helper functions for formatting. More...

Functions

template<typename... Args>
std::string ncformat (const std::locale &loc, std::string_view format, Args &&... args)
 Helper to format using a non-const format string without needing to explicitly construct a format_args. More...
 
template<typename... Args>
std::wstring ncformat (const std::locale &loc, std::wstring_view format, Args &&... args)
 Helper to format using a non-const format wide string without needing to explicitly construct a wformat_args. More...
 

Detailed Description

Namespace containing helper functions for formatting.

Function Documentation

◆ ncformat() [1/2]

template<typename... Args>
std::string ookii::format::ncformat ( const std::locale &  loc,
std::string_view  format,
Args &&...  args 
)

Helper to format using a non-const format string without needing to explicitly construct a format_args.

Template Parameters
ArgsThe types of the format arguments.
Parameters
locThe locale to use for formatting.
formatThe format string.
argsThe arguments
Returns
The formatted string.

◆ ncformat() [2/2]

template<typename... Args>
std::wstring ookii::format::ncformat ( const std::locale &  loc,
std::wstring_view  format,
Args &&...  args 
)

Helper to format using a non-const format wide string without needing to explicitly construct a wformat_args.

Template Parameters
ArgsThe types of the format arguments.
Parameters
locThe locale to use for formatting.
formatThe format string.
argsThe arguments
Returns
The formatted string.