98faa189349f1bb9b033f314ffe327541bacf290
chmalee
  Tue Mar 31 15:17:30 2026 -0700
Add a new hgFindSpec setting, searchItemLabel, that allows using hgFindSpec defined labels (with variable substitution) as the label for each line of a search result. This only works for bigBed tracks. refs #37299

diff --git src/inc/common.h src/inc/common.h
index 2c940400608..5e5bfab6ee1 100644
--- src/inc/common.h
+++ src/inc/common.h
@@ -931,30 +931,35 @@
 
 char *stripHtml(char *s);
 /* replace < and > with [ and ]. Modifies string in-place. Whenever we
  * print a string that we get from the internet, e.g. through HTTP headers,
  * in a hub.txt file or via a HTTP GET or POST argument, we need to strip
  * tags. */
 
 char *replaceChars(char *string, char *oldStr, char *newStr);
 /*
   Replaces the old with the new.
  The old and new string need not be of equal size
  Can take any length string.
  Return value needs to be freeMem'd.
 */
 
+char *replaceFieldInPattern(char *pattern, int fieldCount, char **fieldNames, char **fieldVals);
+/* Given a pattern containing $fieldName or ${fieldName} variable references, replace each
+ * variable with the corresponding value from fieldVals.  The ${} form prevents ambiguity
+ * when one field name is a prefix of another (e.g. "chrom" vs "chromStart"). */
+
 int strSwapStrs(char *string, int sz,char *oldStr, char *newStr);
 /* Swaps all occurrences of the oldStr with the newStr in string. Need not be same size
    Swaps in place but restricted by sz.  Returns count of swaps or -1 for sz failure.*/
 
 char * memSwapChar(char *s, int len, char oldChar, char newChar);
 /* Substitute newChar for oldChar throughout memory of given length.
    old or new may be null */
 #define strSwapChar(s,old,new)   memSwapChar((s),strlen(s),(old),(new))
 #define subChar(s,old,new) (void)memSwapChar((s),strlen(s),(old),(new))
 /* Substitute newChar for oldChar throughout string s. */
 
 void stripChar(char *s, char c);
 /* Remove all occurences of c from s. */
 
 char *stripEnclosingChar(char *inout,char encloser);