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

Function GetFilePathWithoutExtension

SampleFramework11/v1.02/FileIO.cpp:81–91  ·  view source on GitHub ↗

Returns the given file path, minus the extension

Source from the content-addressed store, hash-verified

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

Callers 2

CreateFromSDKMeshFileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected