]> git.sesse.net Git - ccbs/blob - bigscreen/widestring.h
There is no freshcolumnheading.
[ccbs] / bigscreen / widestring.h
1 #ifndef _WIDESTRING_H
2 #define _WIDESTRING_H 1
3
4 #include <string>
5 #include <pqxx/util>
6
7 // UCS-4 string with support for getting from UTF-8
8 class widestring : public std::wstring
9 {
10 public:
11         widestring();
12         widestring(const char *from);
13         widestring(const std::string &from);
14         widestring(const std::wstring &from);
15         void operator= (const char *from);
16 };
17
18 namespace pqxx
19 {
20
21 template<>
22 inline void from_string<widestring>(const char *from, widestring &to)
23 {
24         to = from;
25 }
26
27 }
28
29 #endif /* !defined(_WIDESTRING_H) */