diff options
| author | dacctal <dacctal@symlinx.net> | 2026-05-25 04:13:07 +0000 |
|---|---|---|
| committer | dacctal <dacctal@symlinx.net> | 2026-05-25 04:13:07 +0000 |
| commit | 013b7f659985b540e549599ed2e17adb9c81d858 (patch) | |
| tree | df56ee9e41c8610660e34e1d21014ac8a0fbc871 /src/files.c | |
| parent | b916aeed79d56158a38f88d37ad51ef90f9a154d (diff) | |
frosty telling me one thing that fixes the entire codebase maybe this should just be his project
Diffstat (limited to 'src/files.c')
| -rw-r--r-- | src/files.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/files.c b/src/files.c new file mode 100644 index 0000000..86d9be4 --- /dev/null +++ b/src/files.c @@ -0,0 +1,7 @@ +#include <string.h> + +const char *get_filename_ext(const char *filename) { + const char *dot = strrchr(filename, '.'); + if(!dot || dot == filename) return ""; + return dot + 1; +} |
