Text Analytics Library
a collection of routines for simple textual analysis
 All Files Functions Typedefs
word_list.h
Go to the documentation of this file.
1 
5 #ifndef _WORD_LIST_H_
6 #define _WORD_LIST_H_
7 
12 typedef struct word_list* word_list_t;
13 
24 word_list_create(size_t n);
25 
30 void
32 
37 int
38 word_list_insert(word_list_t wl, const char* word);
39 
43 void
44 word_list_foreach(const word_list_t wl, void(*fp)(char*));
45 
49 void
50 word_list_sort(word_list_t wl, int(*compar)(const void *, const void *));
51 
57 unsigned long
59 
68 void
69 word_list_inject(const word_list_t wl, void *data, int(*fnptr)(void*, const char*));
70 
71 #endif
void word_list_sort(word_list_t wl, int(*compar)(const void *, const void *))
sort a list of words using comparison function
unsigned long word_list_count(const word_list_t wl)
count the number of items in a word list
void word_list_inject(const word_list_t wl, void *data, int(*fnptr)(void *, const char *))
int word_list_insert(word_list_t wl, const char *word)
insert a word into a word list
word_list_t word_list_create(size_t n)
create a new word list
void word_list_free(word_list_t words)
free the memory associated with a word list
void word_list_foreach(const word_list_t wl, void(*fp)(char *))
struct word_list * word_list_t
Definition: word_list.h:12