Browse Source

Add wchar version of plFileUtils::StripExt

Adam Johnson 13 years ago
parent
commit
51e89d630e
  1. 7
      Sources/Plasma/PubUtilLib/plFile/plFileUtils.cpp
  2. 1
      Sources/Plasma/PubUtilLib/plFile/plFileUtils.h

7
Sources/Plasma/PubUtilLib/plFile/plFileUtils.cpp

@ -413,6 +413,13 @@ void plFileUtils::StripExt(char* fileName)
*(ext-1) = '\0';
}
void plFileUtils::StripExt(wchar* fileName)
{
wchar* ext = (wchar*)GetFileExt(fileName);
if (ext)
*(ext-1) = L'\0';
}
const char* plFileUtils::GetFileExt(const char* pathAndName)
{
const char* fileName = GetFileName(pathAndName);

1
Sources/Plasma/PubUtilLib/plFile/plFileUtils.h

@ -100,6 +100,7 @@ namespace plFileUtils
void StripFile(char* pathAndName);
void StripFile(wchar* pathAndName);
void StripExt(char* fileName);
void StripExt(wchar* fileName);
// Get the size of the given file in bytes
UInt32 GetFileSize( const char *path );

Loading…
Cancel
Save