aboutsummaryrefslogtreecommitdiff
path: root/src/common/stdobj.c
diff options
context:
space:
mode:
authorPreston Pan <ret2pop@gmail.com>2025-01-30 21:02:42 -0800
committerPreston Pan <ret2pop@gmail.com>2025-01-30 21:02:42 -0800
commit3780f207f924f14734cb839fd015bd883fe52ff1 (patch)
treede13568dbf97ffe477943854bcb3ea6001b46cf8 /src/common/stdobj.c
parentef9ab1fd141f4057d41f2d6ed8ab8d67c44894d5 (diff)
restructure projectHEADmain
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;
+}