MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / webAccumFilter

Function webAccumFilter

source/MRViewer/MRFileDialog.cpp:369–387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367#endif
368#ifdef __EMSCRIPTEN__
369std::string webAccumFilter( const MR::IOFilters& filters )
370{
371 std::string accumFilter;
372 for ( const auto& filter : filters )
373 {
374 size_t separatorPos = 0;
375 for (;;)
376 {
377 auto nextSeparatorPos = filter.extensions.find( ";", separatorPos );
378 auto ext = filter.extensions.substr( separatorPos, nextSeparatorPos - separatorPos );
379 accumFilter += ( ext.substr( 1 ) + ", " );
380 if ( nextSeparatorPos == std::string::npos )
381 break;
382 separatorPos = nextSeparatorPos + 1;
383 }
384 }
385 accumFilter = accumFilter.substr( 0, accumFilter.size() - 2 );
386 return accumFilter;
387}
388#endif
389
390// Validate paths staged by `MR::UI::TestEngine::stageFileDialogPaths` against the

Callers 3

openFileDialogAsyncFunction · 0.85
openFilesDialogAsyncFunction · 0.85
saveFileDialogAsyncFunction · 0.85

Calls 2

findMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected