MCPcopy Create free account
hub / github.com/ZDoom/Raze / SplitPath

Function SplitPath

source/common/utility/cmdlib.cpp:339–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337//==========================================================================
338
339 void SplitPath(const char* path, FString& directory, FString& base, FString& ext, bool forcebackslash)
340{
341 directory = ExtractFilePath(path, forcebackslash);
342 base = ExtractFileBase(path, forcebackslash);
343 auto dot = base.LastIndexOf('.');
344 if (dot > -1)
345 {
346 ext = base.Mid(dot + 1);
347 base.Truncate(dot);
348 }
349 else
350 ext = "";
351}
352
353
354//==========================================================================

Callers 1

addMemoryResourceFunction · 0.85

Calls 5

ExtractFilePathFunction · 0.85
ExtractFileBaseFunction · 0.85
LastIndexOfMethod · 0.80
MidMethod · 0.80
TruncateMethod · 0.80

Tested by

no test coverage detected