mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 14:55:36 +03:00
added remove_filepath stock
This commit is contained in:
parent
6f2121cd4d
commit
bb292d13ad
@ -163,5 +163,18 @@ stock split(szInput[] , szLeft[] , pL_Max , szRight[] , pR_Max , szDelim[])
|
|||||||
copy(szLeft, pL_Max, szInput);
|
copy(szLeft, pL_Max, szInput);
|
||||||
|
|
||||||
copy(szRightt, pR_Max, szInput[iStart]);
|
copy(szRightt, pR_Max, szInput[iStart]);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Removes a path from szFilePath leaving the name of the file in szFile for a pMax length. */
|
||||||
|
stock remove_filepath(szFilePath[], szFile[], pMax)
|
||||||
|
{
|
||||||
|
new len = strlen(szFilePath);
|
||||||
|
|
||||||
|
while((--len >= 0) && (szFilePath[len] != '/') && (szFilePath[len] != '\')) { }
|
||||||
|
|
||||||
|
copy(szFile , pMax , szFilePath[len + 1]);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user