mirror of
https://github.com/OpenCMT/uLib.git
synced 2025-12-06 15:31:31 +01:00
20 lines
451 B
C++
20 lines
451 B
C++
|
|
#include "ManageFilename.h"
|
|
|
|
|
|
|
|
std::string ManageFilename::GetFileExtension(const std::string& FileName)
|
|
{
|
|
if(FileName.find_last_of(".") != std::string::npos)
|
|
return FileName.substr(FileName.find_last_of(".")+1);
|
|
return "";
|
|
}
|
|
|
|
std::string ManageFilename::GetFileName(const std::string& FileName)
|
|
{
|
|
if(FileName.find_last_of(".") != std::string::npos)
|
|
return FileName.substr(0,FileName.find_last_of("."));
|
|
return "";
|
|
}
|
|
|