dfd893ed6eb311a9b7c8844db7fec58642083c39
angie
  Fri Jan 9 15:46:14 2015 -0800
New toy CGI hgChooseDb based on PPT mockup and ideas from Ann and Matt: popular species icons and autocomplete search for species, as an alternative to hgGateway's menus.  Uses the new ReactJS/ImmutableJS framework.
hgChooseDb.c has three modes of operation:
- HTML output for simple main page with a <div> container to be filled in by javascript
- cart-based JSON responses to ajax requests from javascript (using hg/lib/cartJson.c)
- no cart; fast JSON responses to species-search autocomplete requests

hgChooseDb.jsx is the React/JSX UI view code, compiled to bundle/reactHgChooseDb.js.
hgChooseDbModel.js is a subclass of js/model/lib/ImModel.js that gets initial state
from the server and then responds to user actions.

diff --git src/inc/common.h src/inc/common.h
index e7e23cf..45ce154 100644
--- src/inc/common.h
+++ src/inc/common.h
@@ -781,30 +781,33 @@
 /* Returns TRUE if two strings start with the same c characters. */
 
 #define isEmpty(string) ((string) == NULL || (string)[0] == 0)
 #define isNotEmpty(string) (! isEmpty(string))
 
 int cmpStringsWithEmbeddedNumbers(const char *a, const char *b);
 /* Compare strings such as gene names that may have embedded numbers,
  * so that bmp4a comes before bmp14a */
 
 int cmpWordsWithEmbeddedNumbers(const char *a, const char *b);
 /* Case insensitive version of cmpStringsWithEmbeddedNumbers. */
 
 boolean startsWith(const char *start, const char *string);
 /* Returns TRUE if string begins with start. */
 
+boolean startsWithNoCase(const char *start, const char *string);
+/* Returns TRUE if string begins with start, case-insensitive. */
+
 boolean startsWithWord(char *firstWord, char *line);
 /* Return TRUE if first white-space-delimited word in line
  * is same as firstWord.  Comparison is case sensitive. */
 
 boolean startsWithWordByDelimiter(char *firstWord,char delimit, char *line);
 /* Return TRUE if first word in line is same as firstWord as delimited by delimit.
    Comparison is case sensitive. Delimit of ' ' uses isspace() */
 
 #define stringIn(needle, haystack) strstr(haystack, needle)
 /* Returns position of needle in haystack or NULL if it's not there. */
 /*        char *stringIn(char *needle, char *haystack);      */
 
 char *rStringIn(char *needle, char *haystack);
 /* Return last position of needle in haystack, or NULL if it's not there. */