8 #ifndef BOOST_NOWIDE_CONVERT_HPP_INCLUDED 9 #define BOOST_NOWIDE_CONVERT_HPP_INCLUDED 11 #include <boost/nowide/detail/convert.hpp> 24 inline char*
narrow(
char* output,
size_t output_size,
const wchar_t* begin,
const wchar_t* end)
26 return detail::convert_buffer(output, output_size, begin, end);
35 inline char*
narrow(
char* output,
size_t output_size,
const wchar_t* source)
37 return narrow(output, output_size, source, source + detail::strlen(source));
47 inline wchar_t*
widen(
wchar_t* output,
size_t output_size,
const char* begin,
const char* end)
49 return detail::convert_buffer(output, output_size, begin, end);
58 inline wchar_t*
widen(
wchar_t* output,
size_t output_size,
const char* source)
60 return widen(output, output_size, source, source + detail::strlen(source));
70 inline std::string
narrow(
const wchar_t* s,
size_t count)
72 return detail::convert_string<char>(s, s + count);
80 inline std::string
narrow(
const wchar_t* s)
82 return narrow(s, detail::strlen(s));
90 inline std::string
narrow(
const std::wstring& s)
92 return narrow(s.c_str(), s.size());
102 inline std::wstring
widen(
const char* s,
size_t count)
104 return detail::convert_string<wchar_t>(s, s + count);
112 inline std::wstring
widen(
const char* s)
114 return widen(s, detail::strlen(s));
122 inline std::wstring
widen(
const std::string& s)
124 return widen(s.c_str(), s.size());
wchar_t * widen(wchar_t *output, size_t output_size, const char *begin, const char *end)
Definition: convert.hpp:47
char * narrow(char *output, size_t output_size, const wchar_t *begin, const wchar_t *end)
Definition: convert.hpp:24