summaryrefslogtreecommitdiffstats
path: root/src/sord.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sord.c')
-rw-r--r--src/sord.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sord.c b/src/sord.c
index 17f90e5..1142b41 100644
--- a/src/sord.c
+++ b/src/sord.c
@@ -793,6 +793,15 @@ sord_find(SordModel* sord, const SordQuad pat)
return sord_iter_new(sord, cur, pat, index_order, mode, prefix_len);
}
+bool
+sord_contains(SordModel* sord, const SordQuad pat)
+{
+ SordIter* iter = sord_find(sord, pat);
+ bool ret = (iter != NULL);
+ sord_iter_free(iter);
+ return ret;
+}
+
static SordNode*
sord_lookup_name(SordWorld* world, const uint8_t* str)
{