a310de79beafde036d76654f097af974033828ba
kent
  Mon Dec 6 09:12:13 2021 -0800
Adding slPairCmpWordsWithEmbeddedNumbers library routine to support that nice form of sorting in the faceted table display.

diff --git src/inc/common.h src/inc/common.h
index fa222e8..0f56997 100644
--- src/inc/common.h
+++ src/inc/common.h
@@ -680,30 +680,34 @@
 
 char *slPairListToString(struct slPair *list,boolean quoteIfSpaces);
 // Returns an allocated string of pairs in form of [name1=val1 name2=val2 ...]
 // If requested, will wrap name or val in quotes if contain spaces: [name1="val 1" "name 2"=val2]
 
 char *slPairNameToString(struct slPair *list, char delimiter,boolean quoteIfSpaces);
 // Return string created by joining all names (ignoring vals) with the delimiter.
 // If requested, will wrap name in quotes if contain spaces: [name1,"name 2" ...]
 
 int slPairCmpCase(const void *va, const void *vb);
 /* Compare two slPairs, ignore case. */
 
 void slPairSortCase(struct slPair **pList);
 /* Sort slPair list, ignore case. */
 
+int slPairCmpWordsWithEmbeddedNumbers(const void *va, const void *vb);
+/* Sort slPairList ignoring case and dealing with embedded numbers so 2 comes
+ * before 10, not after. */
+
 int slPairCmp(const void *va, const void *vb);
 /* Compare two slPairs. */
 
 int slPairValCmpCase(const void *va, const void *vb);
 /* Case insensitive compare two slPairs on their values (must be string). */
 
 int slPairValCmp(const void *va, const void *vb);
 /* Compare two slPairs on their values (must be string). */
 
 void slPairValSortCase(struct slPair **pList);
 /* Sort slPair list on values (must be string), ignore case. */
 
 void slPairValSort(struct slPair **pList);
 /* Sort slPair list on values (must be string). */