summaryrefslogtreecommitdiffstats
path: root/lib/inarray.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/inarray.c')
-rw-r--r--lib/inarray.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/inarray.c b/lib/inarray.c
new file mode 100644
index 0000000..e45137a
--- /dev/null
+++ b/lib/inarray.c
@@ -0,0 +1,9 @@
+int char_in_array(char val, char * arr) {
+ int i;
+ for(i = 0; i < sizeof(arr) / sizeof(arr[0]); i++) {
+ if(arr[i] == val) {
+ return 1;
+ }
+ }
+ return 0;
+}