GRASS Programmer's Manual
6.4.2(2012)
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
basename.c
Go to the documentation of this file.
1
17
#include <grass/gis.h>
18
19
#include <ctype.h>
20
#include <string.h>
21
22
37
char
*
G_basename
(
char
*filename,
const
char
*desired_ext)
38
{
39
/* Find the last . in the filename */
40
char
*dot = strrchr(filename,
'.'
);
41
42
if
(dot &&
G_strcasecmp
(dot + 1, desired_ext) == 0)
43
*dot =
'\0'
;
44
45
return
filename;
46
}
lib
gis
basename.c
Generated on Sun Sep 9 2012 18:55:30 for GRASS Programmer's Manual by
1.8.1.2