Botan 3.3.0
Crypto and TLS for C&
Functions
Botan::fmt_detail Namespace Reference

Functions

void do_fmt (std::ostringstream &oss, std::string_view format)
 
template<typename T , typename... Ts>
void do_fmt (std::ostringstream &oss, std::string_view format, const T &val, const Ts &... rest)
 

Function Documentation

◆ do_fmt() [1/2]

void Botan::fmt_detail::do_fmt ( std::ostringstream & oss,
std::string_view format )
inline

Definition at line 20 of file fmt.h.

20 {
21 oss << format;
22}

Referenced by do_fmt(), and Botan::fmt().

◆ do_fmt() [2/2]

template<typename T , typename... Ts>
void Botan::fmt_detail::do_fmt ( std::ostringstream & oss,
std::string_view format,
const T & val,
const Ts &... rest )

Definition at line 25 of file fmt.h.

25 {
26 size_t i = 0;
27
28 while(i < format.size()) {
29 if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
30 oss << val;
31 return do_fmt(oss, format.substr(i + 2), rest...);
32 } else {
33 oss << format[i];
34 }
35
36 i += 1;
37 }
38}
void do_fmt(std::ostringstream &oss, std::string_view format)
Definition fmt.h:20

References do_fmt().