projects
/
vg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2d1c17
)
add static string compare with hash
author
hgn
<hgodden00@gmail.com>
Thu, 19 Dec 2024 14:01:52 +0000
(14:01 +0000)
committer
hgn
<hgodden00@gmail.com>
Thu, 19 Dec 2024 14:01:52 +0000
(14:01 +0000)
vg_string.c
patch
|
blob
|
history
diff --git
a/vg_string.c
b/vg_string.c
index 34b98f7eee21af2747f165efd8d9ddc14620eb50..b62ba6e2f316eef6ff61db86e433b8a495074621 100644
(file)
--- 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;
+}