Update rcore.c
This commit is contained in:
parent
3658e45a80
commit
02776d450e
18
src/rcore.c
18
src/rcore.c
|
|
@ -1946,17 +1946,21 @@ const char *GetFileName(const char *filePath)
|
||||||
// Get filename string without extension (uses static string)
|
// Get filename string without extension (uses static string)
|
||||||
const char *GetFileNameWithoutExt(const char *filePath)
|
const char *GetFileNameWithoutExt(const char *filePath)
|
||||||
{
|
{
|
||||||
const char *fileName = GetFileName(filePath);
|
if (filePath != NULL)
|
||||||
int pos = (int)strlen(fileName);
|
|
||||||
for(int i = pos; i>0; i--)
|
|
||||||
{
|
{
|
||||||
if(fileName[i] == '.')
|
const char *fileName = GetFileName(filePath);
|
||||||
|
int pos = (int)strlen(fileName);
|
||||||
|
for(int i = pos; i>0; i--)
|
||||||
{
|
{
|
||||||
pos = i;
|
if(fileName[i] == '.')
|
||||||
break;
|
{
|
||||||
|
pos = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return TextSubtext(fileName,0,pos);
|
||||||
}
|
}
|
||||||
return TextSubtext(fileName,0,pos);
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get directory for a given filePath
|
// Get directory for a given filePath
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user