From 3780f207f924f14734cb839fd015bd883fe52ff1 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Thu, 30 Jan 2025 21:02:42 -0800 Subject: restructure project --- src/common/stdobj.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/common/stdobj.c (limited to 'src/common/stdobj.c') 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 +#include + +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; +} -- cgit