1 /* ======== SourceMM ========
2 * Copyright (C) 2004-2005 Metamod:Source Development Team
3 * No warranties of any kind
7 * Author(s): David "BAILOPAN" Anderson
8 * ============================
15 * @brief Utility functons
20 * Returns a pointer to the extension in a file name
22 const char *UTIL_GetExtension(const char *file)
24 int len = strlen(file);
27 for (i=len-1; i>=0; i--)
29 if (file[i] == '/' || file[i] == '\\')
32 if ((file[i] == '.') && (i != len-1))
34 return (const char *)&(file[i+1]);