MCPcopy Create free account
hub / github.com/WinMerge/winmerge / LoadFilterString

Method LoadFilterString

Src/Plugins.cpp:245–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243}
244
245void PluginInfo::LoadFilterString()
246{
247 m_filters.clear();
248
249 String sLine(m_filtersText);
250 String sPiece;
251
252 while(1)
253 {
254 String::size_type pos = sLine.rfind(';');
255 sPiece = sLine.substr(pos+1);
256 if (pos == String::npos)
257 pos = 0;
258 sLine.resize(pos);
259 if (sPiece.empty())
260 break;
261
262 sPiece = strutils::makeupper(strutils::trim_ws_begin(sPiece));
263
264 int re_opts = 0;
265 std::string regexString = ucr::toUTF8(sPiece);
266 re_opts |= RegularExpression::RE_UTF8;
267 try
268 {
269 m_filters.emplace_back(std::make_shared<FileFilterElement>(regexString, re_opts, true));
270 }
271 catch (...)
272 {
273 // TODO:
274 }
275 };
276}
277
278
279bool PluginInfo::TestAgainstRegList(const String& szTest) const

Callers 2

OnLVNItemChangingMethod · 0.80
LoadCustomSettingsFunction · 0.80

Calls 6

makeupperFunction · 0.50
trim_ws_beginFunction · 0.50
toUTF8Function · 0.50
clearMethod · 0.45
resizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected