From 587f44fd93a0024500418ce25bf01d0f177644f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20L=2E=20=C5=A0ijanec?= Date: Sat, 16 May 2020 19:35:55 +0200 Subject: easier to add commands, accept values, added substirng --- test/inarray-test.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/inarray-test.c (limited to 'test/inarray-test.c') diff --git a/test/inarray-test.c b/test/inarray-test.c new file mode 100644 index 0000000..21cb1d1 --- /dev/null +++ b/test/inarray-test.c @@ -0,0 +1,16 @@ +#include +#include +#include +#include +extern int main(int argc, char* argv[]) { + if(argc != 3) { + printf("%s c string\n", argv[0]); + return 1; + } + if(char_in_array(argv[1][0], argv[2])) { + printf("%c is in %s\n", argv[1][0], argv[2]); + } else { + printf("%c is NOT in %s\n", argv[1][0], argv[2]); + } + return 0; +} -- cgit v1.2.3