neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
string_utf.hpp File Reference
#include <neolib/neolib.hpp>
#include <algorithm>
#include <string>
#include <map>
#include <vector>
#include <sstream>
#include <cstdlib>
#include <cuchar>
#include <cwchar>
#include <cctype>
#include <cwctype>
#include <cassert>
#include <boost/locale.hpp>
#include <neolib/core/string.hpp>

Go to the source code of this file.

Classes

struct  neolib::detail::character_map_updater
 
struct  neolib::detail::character_map_updater::short_narrow_string
 
struct  neolib::detail::no_character_map_updater
 
class  neolib::any_to_utf16_result< StringT >
 
class  neolib::any_to_utf16_result< std::u16string >
 

Namespaces

namespace  neolib
 
namespace  neolib::utf16
 
namespace  neolib::detail
 

Typedefs

typedef char32_t neolib::unicode_char_t
 
typedef std::map< std::string::size_type, std::u16string::size_type > neolib::utf16_to_utf8_character_map
 

Functions

bool neolib::utf16::is_high_surrogate (unicode_char_t aCharacter)
 
bool neolib::utf16::is_low_surrogate (unicode_char_t aCharacter)
 
bool neolib::utf16::is_surrogate_pair (unicode_char_t aHighValue, unicode_char_t aLowValue)
 
std::size_t neolib::append_utf8 (std::string &aString, unicode_char_t aCharacter)
 
template<bool AllowUpper128, typename CharacterMapUpdater >
std::string neolib::utf16_to_utf8 (const std::u16string &aString, CharacterMapUpdater aCharacterMapUpdater)
 
template<bool AllowUpper128>
std::string neolib::utf16_to_utf8 (const std::u16string &aString)
 
template<bool AllowUpper128>
std::string neolib::utf16_to_utf8 (const std::u16string &aString, utf16_to_utf8_character_map &aCharMap)
 
std::string neolib::utf16_to_utf8 (const std::u16string &aString)
 
std::string neolib::utf16_to_utf8 (const std::u16string &aString, utf16_to_utf8_character_map &aCharMap)
 
template<typename FwdIter >
unicode_char_t neolib::detail::next_utf_bits (unicode_char_t aUnicodeChar, std::size_t aCount, FwdIter &aCurrent, FwdIter aEnd)
 
void neolib::detail::default_utf16_conversion_callback (std::string::size_type, std::u16string::size_type)
 
void neolib::detail::default_utf32_conversion_callback (std::string::size_type, std::u32string::size_type)
 
template<typename Callback >
std::u16string neolib::utf8_to_utf16 (const std::string &aString, Callback aCallback, bool aCodePageFallback=false)
 
std::u16string neolib::utf8_to_utf16 (const std::string &aString, bool aCodePageFallback=false)
 
template<typename Callback >
std::u32string neolib::utf8_to_utf32 (std::string_view const &aStringView, Callback aCallback, bool aCodePageFallback=false)
 
template<typename Callback >
std::u32string neolib::utf8_to_utf32 (std::string::const_iterator aBegin, std::string::const_iterator aEnd, Callback aCallback, bool aCodePageFallback=false)
 
template<typename Callback >
std::u32string neolib::utf8_to_utf32 (const std::string &aString, Callback aCallback, bool aCodePageFallback=false)
 
std::u32string neolib::utf8_to_utf32 (std::string::const_iterator aBegin, std::string::const_iterator aEnd, bool aCodePageFallback=false)
 
std::u32string neolib::utf8_to_utf32 (const std::string &aString, bool aCodePageFallback=false)
 
std::u32string neolib::utf8_to_utf32 (const std::string_view &aStringView, bool aCodePageFallback=false)
 
std::string neolib::utf32_to_utf8 (const std::u32string &aString)
 
bool neolib::is_utf8_trailing (char aCharacter)
 
template<typename CharT , typename Traits >
bool neolib::check_utf8 (const std::basic_string_view< CharT, Traits > &aString)
 
template<typename CharT , typename Traits , typename Alloc >
bool neolib::check_utf8 (const std::basic_string< CharT, Traits, Alloc > &aString)
 
bool neolib::check_utf8 (const i_string &aString)
 
template<typename StringT >
StringT neolib::utf16_to_any (const std::u16string &aString)
 
template<>
std::u16string neolib::utf16_to_any< std::u16string > (const std::u16string &aString)
 
template<typename StringT >
StringT neolib::utf8_to_any (const std::string &aString, bool aCodePageFallback=false)
 
template<>
std::string neolib::utf8_to_any< std::string > (const std::string &aString, bool)
 
std::u16string neolib::any_to_utf16 (const std::string &aString, bool aCodePageFallback=false)
 
const std::string & neolib::any_to_utf8 (const std::string &aString)
 
std::string neolib::any_to_utf8 (const std::u16string &aString)
 
const std::u16string & neolib::any_to_utf16 (const std::u16string &aString)
 
any_to_utf16_result< std::string > neolib::any_to_utf16 (const std::string::value_type *aString, std::string::size_type aStringLength)
 
any_to_utf16_result< std::u16string > neolib::any_to_utf16 (const std::u16string::value_type *aString, std::u16string::size_type aStringLength)
 
template<typename CharT , typename Traits , typename Alloc >
std::string neolib::utf16_to_narrow (const std::basic_string< CharT, Traits, Alloc > &aWideString)
 
template<typename CharT , typename Traits , typename Alloc >
std::u16string neolib::narrow_to_utf16 (const std::basic_string< CharT, Traits, Alloc > &aNarrowString)
 

Variables

const char neolib::INVALID_CHAR8 = '?'
 
const unicode_char_t neolib::INVALID_CHAR32 = static_cast<unicode_char_t>(0xFFFD)