35b8555ff457cb83b559327c6d7e9a1c5e5d5b04 tdreszer Tue Mar 15 09:31:17 2011 -0700 Added useful function used by text search alogrithm diff --git src/inc/common.h src/inc/common.h index c3adc0a..68ba357 100644 --- src/inc/common.h +++ src/inc/common.h @@ -562,30 +562,33 @@ struct slName *slNameAddTail(struct slName **pList, char *name); /* Add name to end of list (not efficient for long lists), * and return it. */ struct slName *slNameCloneList(struct slName *list); /* Return clone of list. */ struct slName *slNameListFromString(char *s, char delimiter); /* Return list of slNames gotten from parsing delimited string. * The final delimiter is optional. a,b,c and a,b,c, are equivalent * for comma-delimited lists. */ #define slNameListFromComma(s) slNameListFromString(s, ',') /* Parse out comma-separated list. */ +struct slName *slNameListOfUniqueWords(char *text); +// Return list of unique words found by parsing string delimited by whitespace. + struct slName *slNameListFromStringArray(char *stringArray[], int arraySize); /* Return list of slNames from an array of strings of length arraySize. * If a string in the array is NULL, the array will be treated as * NULL-terminated. */ char *slNameListToString(struct slName *list, char delimiter); /* Return string created by joining all names with the delimiter. */ struct slName *slNameLoadReal(char *fileName); /* load file lines that are not blank or start with a '#' into a slName * list */ struct slName *slNameIntersection(struct slName *a, struct slName *b); /* return intersection of two slName lists. */