mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-18 17:28:15 +00:00
REVIEWED: GetFileExtension() to include the dot #1523
This commit is contained in:
@@ -2351,14 +2351,14 @@ bool DirectoryExists(const char *dirPath)
|
||||
return result;
|
||||
}
|
||||
|
||||
// Get pointer to extension for a filename string
|
||||
// Get pointer to extension for a filename string (includes the dot: .png)
|
||||
const char *GetFileExtension(const char *fileName)
|
||||
{
|
||||
const char *dot = strrchr(fileName, '.');
|
||||
|
||||
if (!dot || dot == fileName) return NULL;
|
||||
|
||||
return (dot + 1);
|
||||
return dot;
|
||||
}
|
||||
|
||||
// String pointer reverse break: returns right-most occurrence of charset in s
|
||||
|
Reference in New Issue
Block a user