blob: 65257c58cbc49ffcdacb6d16eb8b5ba660335c5e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include "fmtstrformatter.h"
namespace newsboat {
FmtStrFormatter::FmtStrFormatter()
: rs_object(fmtstrformatter::bridged::create())
{
}
void FmtStrFormatter::register_fmt(char f, const std::string& value)
{
fmtstrformatter::bridged::register_fmt(*rs_object, f, value);
}
std::string FmtStrFormatter::do_format(const std::string& fmt,
unsigned int width)
{
auto formatted = fmtstrformatter::bridged::do_format(*rs_object, fmt, width);
return std::string(formatted);
}
} // namespace newsboat
|