kblib 0.2.3
General utilities library for modern C++
|
Provides some basic interfaces to make using ICU smoother. More...
#include "tdecl.h"
#include <ostream>
#include <string>
#include <typeinfo>
#include <unicode/unistr.h>
Go to the source code of this file.
Namespaces | |
namespace | kblib |
The main namespace in which all entities from kblib are defined. | |
namespace | kblib::icu_str_ops |
Functions | |
template<typename string = std::string> | |
auto | kblib::toUTF8 (const icu::UnicodeString &s) -> string |
Convert a UnicodeString to a UTF-8 string. More... | |
template<typename string > | |
auto | kblib::fromUTF8 (string s) -> icu::UnicodeString |
Convert a UTF-8 string into a UnicodeString. More... | |
template<typename string = std::u32string> | |
auto | kblib::toUTF32 (const icu::UnicodeString &s) -> string |
Converts a UnicodeString to UTF-32. More... | |
template<typename string > | |
auto | kblib::fromUTF32 (string s) -> icu::UnicodeString |
Converts a UTF-32 string into a UnicodeString. More... | |
auto | kblib::icu_str_ops::operator<< (std::ostream &os, const icu::UnicodeString &str) -> std::ostream & |
Provides a transcoding stream insertion operator for UnicodeStrings. More... | |
auto | kblib::icu_str_ops::operator+ (std::string lhs, const icu::UnicodeString &str) -> std::string |
Give the strange ICU interface for concatenating UTF-8 and UnicodeStrings a more idiomatic name in the form of operator+. More... | |
auto | kblib::icu_str_ops::operator+ (icu::UnicodeString lhs, const std::string &rhs) -> icu::UnicodeString |
template<typename T > | |
auto | kblib::fromStr (const icu::UnicodeString &val, const char *type=typeid(T).name()) -> T |
Reencodes val to UTF-8 and then converts it to T using the primary overload. More... | |
Provides some basic interfaces to make using ICU smoother.
Definition in file icu.h.