GRASS Programmer's Manual
6.4.4(2014)-r
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
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
}
NULL
#define NULL
Definition:
strings.c:26
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
lib
gis
index.c
Generated on Fri Sep 5 2014 08:29:33 for GRASS Programmer's Manual by
1.8.8