aboutsummaryrefslogtreecommitdiff
path: root/src/common/stdobj.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/stdobj.c')
-rw-r--r--src/common/stdobj.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/common/stdobj.c b/src/common/stdobj.c
new file mode 100644
index 0000000..c7657ed
--- /dev/null
+++ b/src/common/stdobj.c
@@ -0,0 +1,12 @@
+#include "../include/stdobj.h"
+#include "../include/better_string.h"
+#include <stdbool.h>
+#include <stdlib.h>
+
+bool array_in(array_t *a, string_t *s) {
+ for (int i = 0; i < a->size; i++) {
+ if (string_cmp(a->items[i], s))
+ return true;
+ }
+ return false;
+}