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

Method RemoveString

libs/i18n/string_utf8_multilang.cpp:82–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void StringUtf8Multilang::RemoveString(localisation::LanguageIndex const languageIndex)
83{
84 size_t i = 0;
85 size_t const sz = m_s.size();
86
87 while (i < sz)
88 {
89 size_t const next = GetNextIndex(i);
90
91 if ((m_s[i] & kLangCodeMask) == languageIndex)
92 {
93 m_s.erase(i, next - i);
94 return;
95 }
96
97 i = next;
98 }
99}
100
101bool StringUtf8Multilang::HasString(localisation::LanguageIndex const languageIndex) const
102{

Callers 2

RemoveUselessNamesMethod · 0.45
UNIT_TESTFunction · 0.45

Calls 2

sizeMethod · 0.45
eraseMethod · 0.45

Tested by 1

UNIT_TESTFunction · 0.36