MCPcopy Create free account
hub / github.com/MultiMC/Launcher / RemoveInvalidFilenameChars

Function RemoveInvalidFilenameChars

launcher/FileSystem.cpp:304–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302QString badFilenameChars = "\"\\/?<>:;*|!+\r\n";
303
304QString RemoveInvalidFilenameChars(QString string, QChar replaceWith)
305{
306 for (int i = 0; i < string.length(); i++)
307 {
308 if (badFilenameChars.contains(string[i]))
309 {
310 string[i] = replaceWith;
311 }
312 }
313 return string;
314}
315
316QString DirNameFromString(QString string, QString inDir)
317{

Callers 2

DirNameFromStringFunction · 0.85
doExportMethod · 0.85

Calls 2

lengthMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected