MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / RemoveInvalidFilenameChars

Function RemoveInvalidFilenameChars

launcher/FileSystem.cpp:324–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322QString badFilenameChars = "\"\\/?<>:;*|!+\r\n";
323
324QString RemoveInvalidFilenameChars(QString string, QChar replaceWith)
325{
326 for (int i = 0; i < string.length(); i++) {
327 if (badFilenameChars.contains(string[i])) {
328 string[i] = replaceWith;
329 }
330 }
331 return string;
332}
333
334QString DirNameFromString(QString string, QString inDir)
335{

Callers 3

DirNameFromStringFunction · 0.85
commitStagedInstanceMethod · 0.85
doExportMethod · 0.85

Calls 2

lengthMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected