GRASS Programmer's Manual
6.4.3(2013)-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
}
lib
gis
index.c
Generated on Thu Sep 26 2013 09:48:03 for GRASS Programmer's Manual by
1.8.4