libexplain  1.4.D001
Data Structures | Typedefs | Functions
libexplain/string_list.h File Reference
#include <libexplain/ac/stddef.h>

Go to the source code of this file.

Data Structures

struct  explain_string_list_t

Typedefs

typedef struct
explain_string_list_t 
explain_string_list_t

Functions

void explain_string_list_split (explain_string_list_t *result, const char *text)
void explain_string_list_constructor (explain_string_list_t *slp)
void explain_string_list_destructor (explain_string_list_t *slp)
void explain_string_list_append (explain_string_list_t *slp, const char *text)
void explain_string_list_append_unique (explain_string_list_t *slp, const char *text)
void explain_string_list_append_n (explain_string_list_t *slp, const char *text, size_t tsize)
void explain_string_list_sort (explain_string_list_t *slp)

Typedef Documentation

Definition at line 25 of file string_list.h.


Function Documentation

void explain_string_list_append ( explain_string_list_t slp,
const char *  text 
)

The explain_string_list_append function is used to add another string to the end of the list. The string is *always* copied.

Parameters:
slpThe string list to operate on.
textThe string to be appended.

Definition at line 79 of file string_list.c.

void explain_string_list_append_n ( explain_string_list_t slp,
const char *  text,
size_t  tsize 
)

The explain_string_list_append_n function is used to add another string to the end of the list. The string is *always* copied.

Parameters:
slpThe string list to operate on.
textThe string to be appended.
tsizeThe length of the string to be appended.

Definition at line 86 of file string_list.c.

void explain_string_list_append_unique ( explain_string_list_t slp,
const char *  text 
)

The explain_string_list_append_unique function is used to add another string to the end of the list, provided that the string is not already in the list. The string is *always* copied if it is used.

Parameters:
slpThe string list to operate on.
textThe string to be appended.

Definition at line 71 of file string_list.c.

The explain_string_list_constructor function is used to prepare a string list for use.

Parameters:
slpThe string list to operate on.

Definition at line 30 of file string_list.c.

The explain_string_list_destruct function is used to release the resources held by a string list, when you are done with it.

Parameters:
slpThe string list to operate on.

Definition at line 39 of file string_list.c.

The explain_string_list_sort function is used to sort a string list into ascending lexicographical order.

Parameters:
slpThe string list to operate on.

Definition at line 140 of file string_list.c.

void explain_string_list_split ( explain_string_list_t result,
const char *  text 
)

The explain_string_list_split function may be used to break a string to to several string in a string_list_t. The parts are separated by white space.

Parameters:
resultWhere to put the strings.
textThe text to be split into words.

Definition at line 107 of file string_list.c.