diff options
author | David Robillard <d@drobilla.net> | 2011-06-09 06:11:04 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-06-09 06:11:04 +0000 |
commit | 0c28ca816f7d28d8a522d41f2d6d31d0112324da (patch) | |
tree | 143963fd5f8f89424936a3479e9b7cdc8377e24a /src/sord.c | |
parent | edcd7137e091df562f70daa1092f09d4e92f15a3 (diff) | |
download | sord-0c28ca816f7d28d8a522d41f2d6d31d0112324da.tar.gz sord-0c28ca816f7d28d8a522d41f2d6d31d0112324da.tar.bz2 sord-0c28ca816f7d28d8a522d41f2d6d31d0112324da.zip |
Add sord_contains (ticket #711).
git-svn-id: http://svn.drobilla.net/sord/trunk@148 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'src/sord.c')
-rw-r--r-- | src/sord.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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) { |