154 if (!(std::count(moneyString.begin(), moneyString.end(),
'g') == 1 ||
155 std::count(moneyString.begin(), moneyString.end(),
's') == 1 ||
156 std::count(moneyString.begin(), moneyString.end(),
'c') == 1))
162 std::string tokenString(*itr);
163 size_t gCount = std::count(tokenString.begin(), tokenString.end(),
'g');
164 size_t sCount = std::count(tokenString.begin(), tokenString.end(),
's');
165 size_t cCount = std::count(tokenString.begin(), tokenString.end(),
'c');
166 if (gCount + sCount + cCount != 1)
169 uint64 amount = atol(*itr);
171 money += amount * 100 * 100;
172 else if (sCount == 1)
173 money += amount * 100;
174 else if (cCount == 1)
404 static wchar_t const a_End[] = { wchar_t(1), wchar_t(0x0430), wchar_t(0x0000) };
405 static wchar_t const o_End[] = { wchar_t(1), wchar_t(0x043E), wchar_t(0x0000) };
406 static wchar_t const ya_End[] = { wchar_t(1), wchar_t(0x044F), wchar_t(0x0000) };
407 static wchar_t const ie_End[] = { wchar_t(1), wchar_t(0x0435), wchar_t(0x0000) };
408 static wchar_t const i_End[] = { wchar_t(1), wchar_t(0x0438), wchar_t(0x0000) };
409 static wchar_t const yeru_End[] = { wchar_t(1), wchar_t(0x044B), wchar_t(0x0000) };
410 static wchar_t const u_End[] = { wchar_t(1), wchar_t(0x0443), wchar_t(0x0000) };
411 static wchar_t const yu_End[] = { wchar_t(1), wchar_t(0x044E), wchar_t(0x0000) };
412 static wchar_t const oj_End[] = { wchar_t(2), wchar_t(0x043E), wchar_t(0x0439), wchar_t(0x0000) };
413 static wchar_t const ie_j_End[] = { wchar_t(2), wchar_t(0x0435), wchar_t(0x0439), wchar_t(0x0000) };
414 static wchar_t const io_j_End[] = { wchar_t(2), wchar_t(0x0451), wchar_t(0x0439), wchar_t(0x0000) };
415 static wchar_t const o_m_End[] = { wchar_t(2), wchar_t(0x043E), wchar_t(0x043C), wchar_t(0x0000) };
416 static wchar_t const io_m_End[] = { wchar_t(2), wchar_t(0x0451), wchar_t(0x043C), wchar_t(0x0000) };
417 static wchar_t const ie_m_End[] = { wchar_t(2), wchar_t(0x0435), wchar_t(0x043C), wchar_t(0x0000) };
418 static wchar_t const soft_End[] = { wchar_t(1), wchar_t(0x044C), wchar_t(0x0000) };
419 static wchar_t const j_End[] = { wchar_t(1), wchar_t(0x0439), wchar_t(0x0000) };
421 static wchar_t const*
const dropEnds[6][8] = {
422 { &a_End[1], &o_End[1], &ya_End[1], &ie_End[1], &soft_End[1], &j_End[1], NULL, NULL },
423 { &a_End[1], &ya_End[1], &yeru_End[1], &i_End[1], NULL, NULL, NULL, NULL },
424 { &ie_End[1], &u_End[1], &yu_End[1], &i_End[1], NULL, NULL, NULL, NULL },
425 { &u_End[1], &yu_End[1], &o_End[1], &ie_End[1], &soft_End[1], &ya_End[1], &a_End[1], NULL },
426 { &oj_End[1], &io_j_End[1], &ie_j_End[1], &o_m_End[1], &io_m_End[1], &ie_m_End[1], &yu_End[1], NULL },
427 { &ie_End[1], &i_End[1], NULL, NULL, NULL, NULL, NULL, NULL }
430 for (
wchar_t const*
const* itr = &dropEnds[declension][0]; *itr; ++itr)
432 size_t len = size_t((*itr)[-1]);
434 if (wname.substr(wname.size() - len, len) == *itr)
435 return wname.substr(0, wname.size() - len);