1 #ifndef LIBJMMCG_CORE_UNICODE_CONVERSIONS_HPP
2 #define LIBJMMCG_CORE_UNICODE_CONVERSIONS_HPP
34 : ct(
std::use_facet<
std::ctype<
wchar_t> >(
std::locale())) {
41 std::ctype<
wchar_t>
const & ct;
46 : ct(
std::use_facet<
std::ctype<
wchar_t> >(
std::locale())) {
49 return ct.narrow(c,
' ');
53 std::ctype<
wchar_t>
const & ct;
56 inline std::wstring
__fastcall
58 std::wstring ret(in.size(), std::wstring::value_type(0));
61 #if defined(_MSC_VER) && (_MSC_VER < 1300
)
62 std::ctype<
wchar_t>().widen(in.data(),in.data()+in.size(),&(*ret.begin()));
64 std::transform(in.begin(),in.end(),ret.begin(),
widen());
69 inline std::string
__fastcall
71 const std::wstring &in
72 #if defined(_MSC_VER) && (_MSC_VER < 1300
)
76 std::string ret(in.size(), std::string::value_type(0));
79 #if defined(_MSC_VER) && (_MSC_VER < 1300
)
80 std::ctype<
wchar_t>().narrow(in.data(),in.data()+in.size(),dflt,&(*ret.begin()));
82 std::transform(in.begin(),in.end(),ret.begin(),
narrow());
98 inline std::wstring
__fastcall
120 inline std::string
__fastcall
135 #pragma warning(default:4284
)