basename --
return the last element of a path name
Synopsis
cc [flag . . . ] file . . . -lgen [library] . . .
#include <libgen.h>
char basename(char path);
Description
Given a pointer to a null-terminated character string that contains
a path name, basename
returns a pointer to the last element of path.
Trailing ``/'' characters are deleted.
If the string pointed to by path contains / only,
basename returns a pointer to /.
If
path
or
path
is zero, pointer to a static constant ``.'' is returned.