23 lines
442 B
C
Raw Normal View History

#pragma once
#include <string>
2013-11-22 19:28:04 -05:00
#include <sstream>
#ifdef USE_ICU4C
#include <unicode/unistr.h>
typedef std::basic_string<UChar> UCharString;
#else
typedef std::u16string UCharString;
#endif
namespace peparse {
2013-11-22 19:28:04 -05:00
template <class T>
2017-03-31 17:01:20 +02:00
static std::string to_string(T t, std::ios_base &(*f)(std::ios_base &) ) {
std::ostringstream oss;
oss << f << t;
return oss.str();
2013-11-22 19:28:04 -05:00
}
std::string from_utf16(const UCharString &u);
} // namespace peparse