7a9ec1f838c6a2546278075ffe575fc950ef0b45 kent Tue Dec 14 20:58:27 2021 -0800 Addng slName sorting function that ignores case and sorts numbers. diff --git src/inc/common.h src/inc/common.h index 0f56997..6e6a3f4 100644 --- src/inc/common.h +++ src/inc/common.h @@ -529,30 +529,35 @@ /* Free a list of slNames */ struct slName *slNameNewN(char *name, int size); /* Return new slName of given size. */ int slNameCmpCase(const void *va, const void *vb); /* Compare two slNames, ignore case. */ int slNameCmp(const void *va, const void *vb); /* Compare two slNames. */ int slNameCmpStringsWithEmbeddedNumbers(const void *va, const void *vb); /* Compare strings such as gene names that may have embedded numbers, * so that bmp4a comes before bmp14a */ +int slNameCmpWordsWithEmbeddedNumbers(const void *va, const void *vb); +/* Compare strings such as gene names that may have embedded numbers, + * in a string sensitive way so that bmp4a comes before bmp14a + * and ABc and abC are treated as the same. A little slow. */ + void slNameSortCase(struct slName **pList); /* Sort slName list, ignore case. */ void slNameSort(struct slName **pList); /* Sort slName list. */ boolean slNameInList(struct slName *list, char *string); /* Return true if string is in name list -- case insensitive. */ boolean slNameInListUseCase(struct slName *list, char *string); /* Return true if string is in name list -- case sensitive. */ void *slNameFind(void *list, char *string); /* Return first element of slName list (or any other list starting * with next/name fields) that matches string. This is case insensitive. */