GRASS Programmer's Manual
6.4.1(2011)
|
GIS Library - Token functions. More...
#include <stdlib.h>
#include <grass/gis.h>
Go to the source code of this file.
Functions | |
char ** | G_tokenize (const char *buf, const char *delim) |
Tokenize string. | |
int | G_number_of_tokens (char **tokens) |
Return number of tokens. | |
int | G_free_tokens (char **tokens) |
Free memory allocated to tokens. |
GIS Library - Token functions.
(C) 2001-2008 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file token.c.
int G_free_tokens | ( | char ** | tokens | ) |
Free memory allocated to tokens.
Note: G_free_tokens() must be called when finished with tokens to release memory.
[in,out] | tokens |
Definition at line 98 of file token.c.
References G_free(), and NULL.
Referenced by G_get_window(), and G_parser().
int G_number_of_tokens | ( | char ** | tokens | ) |
char** G_tokenize | ( | const char * | buf, |
const char * | delim | ||
) |
Tokenize string.
Given a string, buf, turn delimiter, delim, into '\0' (NULL) and place pointers to tokens in tokens. buf must not contain a new line (
).
[in] | buf | input string |
[in] | delim | string delimiter |
Definition at line 33 of file token.c.
References G_index(), G_store(), and NULL.
Referenced by G_get_window(), and G_parser().