MCPcopy Create free account
hub / github.com/couchbase/forestdb / iniparser_getstring

Function iniparser_getstring

utils/iniparser.cc:728–740  ·  view source on GitHub ↗

-------------------------------------------------------------------------*/ @brief Get the string associated to a key @param d Dictionary to search @param key Key string to look for @param def Default value to return if key not found. @return pointer to statically allocated character string This function queries a dictionary for a key. A key as read from an

Source from the content-addressed store, hash-verified

726 */
727/*--------------------------------------------------------------------------*/
728char * iniparser_getstring(dictionary * d, char * key, char * def)
729{
730 char * lc_key ;
731 char * sval ;
732
733 if (d==NULL || key==NULL)
734 return def ;
735
736 lc_key = strdup(strlwc(key));
737 sval = dictionary_get(d, lc_key, def);
738 free(lc_key);
739 return sval ;
740}
741
742
743

Callers 5

iniparser_getstrFunction · 0.85
iniparser_getintFunction · 0.85
iniparser_getdoubleFunction · 0.85
iniparser_getbooleanFunction · 0.85
iniparser_find_entryFunction · 0.85

Calls 2

strlwcFunction · 0.85
dictionary_getFunction · 0.85

Tested by

no test coverage detected