forked from organicmaps/organicmaps
Added debug print to MultilangUtf8
This commit is contained in:
parent
6e2731d4a4
commit
38efa76768
1 changed files with 18 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue