-
Notifications
You must be signed in to change notification settings - Fork 934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] case-less finding #149
Comments
You can use |
I took a look at |
I tried by replacing ...
#include <string.h>
int my_strncasecmp(const char *s1, const char *s2, size_t n) {
printf("Aww yeah! ...\n");
return strncasecmp(s1, s2, n);
}
#define uthash_memcmp my_strncasecmp
#include "uthash.h"
struct pair {
... it seems the |
Ah, yes. You can't use "the case-insensitive form of the key" as a hash key, because then you'd need to design a case-insensitive hash function (so that And then yes, you'd either have to redefine
and then use the existing You could also probably do it by redefining I'm not sure there's anything that uthash.h can do to make your life easier here. |
Thank you very much for answering! I've used this same design b4r_hs.h#L34. My Anyway, this is only a detail, because |
Hey dudes, I'm going to close this issue. I fixed the problem using an "extra" field as @Quuxplusone suggested (thanks again!). It is awesome and avoids to grows |
Hello.
Consider the following example:
The output will be
None
, so it would be nice ifuthash
could allow to find items by case-less key, something likeHASH_FIND_STR_CL()
orHASH_FIND_STR_CASE_LESS()
.Thank you!
The text was updated successfully, but these errors were encountered: