From a22929b1ff8c029946bd3af20328f17967338bb6 Mon Sep 17 00:00:00 2001 From: hgn Date: Thu, 19 Dec 2024 14:01:52 +0000 Subject: [PATCH] add static string compare with hash --- vg_string.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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; +} -- 2.25.1