MCPcopy Create free account
hub / github.com/comaps/comaps / FindString

Method FindString

libs/i18n/string_utf8_multilang.cpp:113–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113localisation::LanguageIndex StringUtf8Multilang::FindString(std::string const & utf8s) const
114{
115 localisation::LanguageIndex result = localisation::kUnsupportedLanguageIndex;
116
117 ForEach([&utf8s, &result](localisation::LanguageIndex const languageIndex, std::string_view name)
118 {
119 if (name == utf8s)
120 {
121 result = languageIndex;
122 return base::ControlFlow::Break;
123 }
124 return base::ControlFlow::Continue;
125 });
126
127 return result;
128}
129
130size_t StringUtf8Multilang::CountLangs() const
131{

Callers 1

Calls 1

ForEachFunction · 0.85

Tested by

no test coverage detected