Deleted the open_hpi_testsuite, as we won't need it
[ltp-debian.git] / pan / splitstr.h
blob2ffa24f432698ae3735e15ef5a54e2a44e912441
1 #ifndef _SPLITSTR_H_
2 #define _SPLITSTR_H_
3 /*
4 * Synopsis
6 * const char **splitstr(const char *str, const char *separator, int *argcount)
8 * Description
9 * This function splits a string (str) into components that are separated by
10 * one or more of the characters in the (separator) string. An array of
11 * strings is returned, along with argcount being set to the number of strings
12 * found. Argcount can be NULL. There will always be a NULL element in the
13 * array after the last valid element. If an error occurs, NULL will be
14 * returned and argcount will be set to zero.
16 * To rid yourself of the memory allocated for splitstr(), pass the return
17 * value from splitstr() unmodified to splitstr_free():
19 * void splitstr_free( const char ** return_from_splitstr );
22 const char **
23 splitstr(const char *, const char *, int *);
26 * splitster_free( const char ** )
28 * This takes the return value from splitster() and free()s memory
29 * allocated by splitster. Assuming: ret=splitster(...), this
30 * requires that ret and *ret returned from splitster() have not
31 * been modified.
33 void
34 splitstr_free( const char ** );
36 #endif