Files
MapLibreParticleLab/include/mbgl/util/utf.hpp
2014-11-03 09:12:23 -05:00

26 lines
501 B
C++

#ifndef MBGL_UTIL_UTF
#define MBGL_UTIL_UTF
#include <memory>
#include <boost/regex/pending/unicode_iterator.hpp>
namespace mbgl {
namespace util {
class utf8_to_utf32 {
public:
explicit utf8_to_utf32() {}
std::u32string convert(std::string const& utf8)
{
boost::u8_to_u32_iterator<std::string::const_iterator> begin(utf8.begin());
boost::u8_to_u32_iterator<std::string::const_iterator> end(utf8.end());
return std::u32string(begin,end);
}
};
}}
#endif