StripExt
This function removes the file extension from a file path.
Syntax
- static std::string StripExt(const std::string& path)
Parameters
- path: the file path to process.
Returns
Returns the file directory and name, without the extension part.
Example
#include "Leadwerks.h"
using namespace Leadwerks;
int main(int argc, const char *argv[])
{
std::string path = "MyFile.txt";
path = FileSystem::RealPath(path);
//Remove the extension
System::Print(FileSystem::StripExt(path));
return 0;
}