STRINGLIST(3) | Library Functions Manual | STRINGLIST(3) |
stringlist
,
sl_init
, sl_add
,
sl_free
, sl_find
—
stringlist manipulation functions
Standard C Library (libc, -lc)
#include
<stringlist.h>
StringList *
sl_init
();
int
sl_add
(StringList
*sl, char
*item);
void
sl_free
(StringList
*sl, int
freeall);
char *
sl_find
(StringList
*sl, char
*item);
The stringlist
functions manipulate
stringlists, which are lists of strings that extend automatically if
necessary.
The StringList structure has the following definition:
typedef struct _stringlist { char **sl_str; size_t sl_max; size_t sl_cur; } StringList;
The following stringlist manipulation functions are available:
sl_init
()NULL
in case
of failure.sl_free
()sl_add
()sl_find
()The stringlist
functions appeared in
FreeBSD 2.2.6 and NetBSD
1.3.
November 28, 1999 | macOS 15.2 |