GRASS Programmer's Manual
6.5.svn(2014)-r66266
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
gis/index.c
Go to the documentation of this file.
1
/* TODO: should this go into strings.c ? */
2
3
#include <grass/gis.h>
4
5
16
char
*
G_index
(
const
char
*str,
int
delim)
17
{
18
while
(*str && *str != delim)
19
str++;
20
if
(delim == 0)
21
return
(
char
*)str;
22
return
*str ? (
char
*)str :
NULL
;
23
}
24
25
36
char
*
G_rindex
(
const
char
*str,
int
delim)
37
{
38
const
char
*p;
39
40
p =
NULL
;
41
while
(*str) {
42
if
(*str == delim)
43
p = str;
44
str++;
45
}
46
if
(delim == 0)
47
return
(
char
*)str;
48
return
(
char
*)p;
49
}
G_index
char * G_index(const char *str, int delim)
delimiter
Definition:
gis/index.c:16
G_rindex
char * G_rindex(const char *str, int delim)
???
Definition:
gis/index.c:36
NULL
return NULL
Definition:
dbfopen.c:1394
lib
gis
index.c
Generated on Sat Jan 2 2016 01:46:48 for GRASS Programmer's Manual by
1.8.5