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); |