1 2 3 4 5 6 7 8 9 10 11 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; }