+/* Searches for 'name' in 'simap'. If found, deletes it and returns true. If
+ * not found, returns false without modifying 'simap'. */
+bool
+simap_find_and_delete(struct simap *simap, const char *name)
+{
+ struct simap_node *node = simap_find(simap, name);
+ if (node) {
+ simap_delete(simap, node);
+ return true;
+ }
+ return false;
+}
+