aboutsummaryrefslogtreecommitdiff
path: root/include/formatstring.h
blob: 98ca5f921eccfc6bf610531c8d2a3386a44863b1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef NEWSBEUTER_FORMATSTRING__H
#define NEWSBEUTER_FORMATSTRING__H

#include <map>
#include <string>

namespace newsbeuter {

class fmtstr_formatter {
	public:
		void register_fmt(char f, const std::string& value);
		std::string do_format(const std::string& fmt, unsigned int width = 0);
		std::wstring do_wformat(const std::wstring& fmt, unsigned int width = 0);
	private:
		std::map<char, std::wstring> fmts;
};


}

#endif