summaryrefslogtreecommitdiffstats
path: root/lib/inarray.c
diff options
context:
space:
mode:
authorAnton L. Šijanec <sijanecantonluka@gmail.com>2020-05-16 19:35:55 +0200
committerAnton L. Šijanec <sijanecantonluka@gmail.com>2020-05-16 19:35:55 +0200
commit587f44fd93a0024500418ce25bf01d0f177644f4 (patch)
tree13a981e5bc369cca8cc99ad9547d54b4c76673f5 /lib/inarray.c
parentfix to allow nested commands (diff)
downloadbverbose-587f44fd93a0024500418ce25bf01d0f177644f4.tar
bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.tar.gz
bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.tar.bz2
bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.tar.lz
bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.tar.xz
bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.tar.zst
bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.zip
Diffstat (limited to '')
-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;
+}