MCPcopy Create free account
hub / github.com/TheRealMJP/Shadows / GetFilePathWithoutExtension

Function GetFilePathWithoutExtension

Shadows/SampleFramework11/FileIO.cpp:75–85  ·  view source on GitHub ↗

Returns the given file path, minus the extension

Source from the content-addressed store, hash-verified

73
74// Returns the given file path, minus the extension
75std::wstring GetFilePathWithoutExtension(const wchar* filePath_)
76{
77 Assert_(filePath_);
78
79 std::wstring filePath(filePath_);
80 size_t idx = filePath.rfind(L'.');
81 if (idx != std::wstring::npos)
82 return filePath.substr(0, idx);
83 else
84 return std::wstring(L"");
85}
86
87// Returns the extension of the file path
88std::wstring GetFileExtension(const wchar* filePath_)

Callers 3

CreateFromSDKMeshFileMethod · 0.85
SaveAsOBJMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected