From: hgn Date: Thu, 19 Dec 2024 14:01:52 +0000 (+0000) Subject: add static string compare with hash X-Git-Url: https://skaterift.com/git/?a=commitdiff_plain;h=a22929b1ff8c029946bd3af20328f17967338bb6;p=vg.git add static string compare with hash --- diff --git a/vg_string.c b/vg_string.c index 34b98f7..b62ba6e 100644 --- a/vg_string.c +++ b/vg_string.c @@ -249,3 +249,11 @@ int vg_strdjb2_eq( const char *s1, u32 h1, const char *s2, u32 h2 ) } else return 0; } + +bool vg_str_eq( const char *s1, const char *s2 ) +{ + if( vg_strdjb2( s1 ) == vg_strdjb2( s2 ) ) + return !strcmp( s1, s2 ); + + return 0; +}