MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / ValidatePathChars

Method ValidatePathChars

Source/Editor/Utilities/EditorUtilities.cpp:366–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364}
365
366void EditorUtilities::ValidatePathChars(String& filename, char invalidCharReplacement)
367{
368 if (invalidCharReplacement == 0)
369 {
370 StringBuilder result;
371 for (int32 i = 0; i < filename.Length(); i++)
372 {
373 if (!IsInvalidPathChar(filename[i]))
374 result.Append(filename[i]);
375 }
376 filename = result.ToString();
377 }
378 else
379 {
380 for (int32 i = 0; i < filename.Length(); i++)
381 {
382 if (IsInvalidPathChar(filename[i]))
383 filename[i] = invalidCharReplacement;
384 }
385 }
386}
387
388bool EditorUtilities::ReplaceInFiles(const String& folderPath, const Char* searchPattern, DirectorySearchOption searchOption, const String& findWhat, const String& replaceWith)
389{

Callers

nothing calls this directly

Calls 3

LengthMethod · 0.45
AppendMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected