aboutsummaryrefslogtreecommitdiff
path: root/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'map.c')
-rw-r--r--map.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/map.c b/map.c
index 9906e42..4e727f4 100644
--- a/map.c
+++ b/map.c
@@ -73,6 +73,11 @@ void *map_closest(const Map *map, const char *prefix)
return m->v;
}
+bool map_contains(const Map *map, const char *prefix)
+{
+ return !map_empty(map_prefix(map, prefix));
+}
+
bool map_put(Map *map, const char *k, const void *value)
{
size_t len = strlen(k);