index.c

Go to the documentation of this file.
00001 #include "gis.h"
00002 
00003 
00014 char *
00015 G_index (str, delim)
00016     register char *str, delim;
00017 {
00018     while (*str && *str != delim)
00019         str++;
00020     if (delim == 0)
00021         return str;
00022     return (*str ? str : NULL);
00023 }
00024 
00025 
00036 char *
00037 G_rindex (str, delim)
00038     register char *str, delim;
00039 {
00040     register char *p;
00041 
00042     p = NULL;
00043     while (*str)
00044     {
00045         if (*str == delim)
00046             p = str;
00047         str ++;
00048     }
00049     if (delim == 0)
00050         return str;
00051     return (p);
00052 }

Generated on Mon Jan 1 19:49:25 2007 for GRASS by  doxygen 1.5.1