kblib 0.2.3
General utilities library for modern C++
kblib::icu_str_ops Namespace Reference

Functions

auto operator<< (std::ostream &os, const icu::UnicodeString &str) -> std::ostream &
 Provides a transcoding stream insertion operator for UnicodeStrings. More...
 
auto 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 operator+ (icu::UnicodeString lhs, const std::string &rhs) -> icu::UnicodeString
 

Detailed Description

Warning
Defining operators for external types is error-prone and may unexpectedly break in the future.

Function Documentation

◆ operator+() [1/2]

auto kblib::icu_str_ops::operator+ ( icu::UnicodeString  lhs,
const std::string &  rhs 
) -> icu::UnicodeString
inline

Definition at line 134 of file icu.h.

◆ operator+() [2/2]

auto kblib::icu_str_ops::operator+ ( std::string  lhs,
const icu::UnicodeString &  str 
) -> std::string
inline

Give the strange ICU interface for concatenating UTF-8 and UnicodeStrings a more idiomatic name in the form of operator+.

Definition at line 126 of file icu.h.

◆ operator<<()

auto kblib::icu_str_ops::operator<< ( std::ostream &  os,
const icu::UnicodeString &  str 
) -> std::ostream&
inline

Provides a transcoding stream insertion operator for UnicodeStrings.

Parameters
osThe stream to insert to.
strThe string to output.
Returns
std::ostream& A reference to os.

Definition at line 117 of file icu.h.