JWS C Library
C language utility library
|
Declarations for manipulating file and directory names. More...
#include <jwsc/config.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <inttypes.h>
#include "jwsc/base/fname.h"
Go to the source code of this file.
Functions | |
static const char * | last_occurrence (const char *fname, char c) |
find the last occurrence of c in fname. | |
int | fname_has_suffix (const char *fname, const char *suffix) |
Returns whether a file name has a certain suffix. | |
char * | get_fname_suffix (const char *fname) |
Returns a copy of the file name suffix, if it has one. | |
char * | get_fname_dir (const char *fname) |
Returns a copy of the file name directory prefix. | |
char * | get_fname_base (const char *fname) |
Declarations for manipulating file and directory names.
Definition in file fname.c.
static const char* last_occurrence | ( | const char * | fname, |
char | c | ||
) | [static] |
int fname_has_suffix | ( | const char * | fname, |
const char * | suffix | ||
) |
char* get_fname_suffix | ( | const char * | fname | ) |
char* get_fname_dir | ( | const char * | fname | ) |
Returns a copy of the file name directory prefix.
Directory is everything before the last '/' in the file name.
fname | File name to get the directory of. |