MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / TranslatePluralToString

Method TranslatePluralToString

pcsx2-gsrunner/Main.cpp:1028–1043  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1026}
1027
1028std::string Host::TranslatePluralToString(const char* context, const char* msg, const char* disambiguation, int count)
1029{
1030 TinyString count_str = TinyString::from_format("{}", count);
1031
1032 std::string ret(msg);
1033 for (;;)
1034 {
1035 std::string::size_type pos = ret.find("%n");
1036 if (pos == std::string::npos)
1037 break;
1038
1039 ret.replace(pos, pos + 2, count_str.view());
1040 }
1041
1042 return ret;
1043}
1044
1045//////////////////////////////////////////////////////////////////////////
1046// Platform specific code

Callers

nothing calls this directly

Calls 3

viewMethod · 0.80
findMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected