Added debug print to MultilangUtf8

This commit is contained in:
Alex Zolotarev 2014-01-27 14:38:00 +03:00 committed by Alex Zolotarev
parent 6e2731d4a4
commit 38efa76768

View file

@ -91,3 +91,21 @@ public:
utils::ReadString(src, m_s);
}
};
string DebugPrint(StringUtf8Multilang const & s)
{
string out;
struct Printer
{
string & m_out;
Printer(string & out) : m_out(out) {}
bool operator()(int8_t code, string const & name) const
{
m_out += string(StringUtf8Multilang::GetLangByCode(code)) + string(":") + name + " ";
return true;
}
} printer(out);
s.ForEachRef(printer);
return out;
}