summaryrefslogblamecommitdiffstats
path: root/test/inarray-test.c
blob: 21cb1d12c71b182913d26c5db7cda4f2e1c3f0d3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                 
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include <inarray.c>
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;
}