9 #ifndef BOOST_NOWIDE_UTF_CONVERT_HPP_INCLUDED 10 #define BOOST_NOWIDE_UTF_CONVERT_HPP_INCLUDED 12 #include <boost/nowide/detail/is_string_container.hpp> 14 #include <boost/nowide/utf/utf.hpp> 25 template<
typename Char>
41 template<
typename CharOut,
typename CharIn>
43 convert_buffer(CharOut* buffer,
size_t buffer_size,
const CharIn* source_begin,
const CharIn* source_end)
49 while(source_begin != source_end)
57 if(buffer_size < width)
74 template<
typename CharOut,
typename CharIn>
75 std::basic_string<CharOut>
convert_string(
const CharIn* begin,
const CharIn* end)
77 std::basic_string<CharOut> result;
78 result.reserve(end - begin);
79 using inserter_type = std::back_insert_iterator<std::basic_string<CharOut>>;
80 inserter_type inserter(result);
std::basic_string< CharOut > convert_string(const CharIn *begin, const CharIn *end)
Definition: convert.hpp:75
Namespace that holds basic operations on UTF encoded sequences.
Definition: convert.hpp:20
static Iterator encode(code_point value, Iterator out)
static const code_point illegal
Special constant that defines illegal code point.
Definition: utf.hpp:33
uint32_t code_point
The integral type that can hold a Unicode code point.
Definition: utf.hpp:28
size_t strlen(const Char *s)
Definition: convert.hpp:26
#define BOOST_NOWIDE_REPLACEMENT_CHARACTER
Definition: replacement.hpp:16
CharOut * convert_buffer(CharOut *buffer, size_t buffer_size, const CharIn *source_begin, const CharIn *source_end)
Definition: convert.hpp:43
static const code_point incomplete
Special constant that defines incomplete code point.
Definition: utf.hpp:38
static int width(code_point value)
static code_point decode(Iterator &p, Iterator e)