forked from organicmaps/organicmaps
Add DebugPrint() for UniString.
This commit is contained in:
parent
a6a4745c5c
commit
473b8e44b7
1 changed files with 16 additions and 1 deletions
|
@ -13,7 +13,17 @@ namespace strings
|
|||
{
|
||||
|
||||
typedef uint32_t UniChar;
|
||||
typedef buffer_vector<UniChar, 32> UniString;
|
||||
//typedef buffer_vector<UniChar, 32> UniString;
|
||||
|
||||
/// Make new type, not typedef. Need to specialize DebugPrint.
|
||||
class UniString : public buffer_vector<UniChar, 32>
|
||||
{
|
||||
typedef buffer_vector<UniChar, 32> BaseT;
|
||||
public:
|
||||
UniString() {}
|
||||
explicit UniString(size_t n, UniChar c = UniChar()) : BaseT(n, c) {}
|
||||
template <class IterT> UniString(IterT b, IterT e) : BaseT(b, e) {}
|
||||
};
|
||||
|
||||
UniString MakeLowerCase(UniString const & s);
|
||||
void MakeLowerCase(UniString & s);
|
||||
|
@ -38,6 +48,11 @@ inline string ToUtf8(UniString const & s)
|
|||
return result;
|
||||
}
|
||||
|
||||
inline string DebugPrint(UniString const & s)
|
||||
{
|
||||
return ToUtf8(s);
|
||||
}
|
||||
|
||||
template <typename DelimFuncT, typename UniCharIterT = UniString::const_iterator>
|
||||
class TokenizeIterator
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue