aboutsummaryrefslogtreecommitdiff
path: root/src/common/stdobj.c
blob: c7657edc81a9254c85b47a74ed90760296b50388 (plain)
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;
}