libidav/utils.c

changeset 854
1c8401ece69e
parent 834
6a466635eace
child 857
03982275f29b
equal deleted inserted replaced
853:2ad93ebdc8d9 854:1c8401ece69e
383 383
384 key.length = value.ptr - key.ptr; 384 key.length = value.ptr - key.ptr;
385 value.ptr++; value.length--; 385 value.ptr++; value.length--;
386 386
387 cxmutstr key_cp = cx_strdup(cx_strtrim(key)); 387 cxmutstr key_cp = cx_strdup(cx_strtrim(key));
388 cx_strlower(key_cp); 388 for(int i=0;i<key_cp.length;i++) {
389 key_cp.ptr[i] = tolower(key_cp.ptr[i]);
390 }
389 cxmutstr value_cp = cx_strdup(cx_strtrim(value)); 391 cxmutstr value_cp = cx_strdup(cx_strtrim(value));
390 392
391 cxMapPut(map, cx_hash_key(key_cp.ptr, key_cp.length), value_cp.ptr); 393 cxMapPut(map, cx_hash_key(key_cp.ptr, key_cp.length), value_cp.ptr);
392 394
393 free(key_cp.ptr); 395 free(key_cp.ptr);

mercurial