xref: /haiku/src/tests/system/libroot/posix/string/compare_test.cpp (revision 83b1a68c52ba3e0e8796282759f694b7fdddf06d)
1 /*
2  * Copyright 2008, Axel Dörfler, axeld@pinc-software.de.
3  * Distributed under the terms of the MIT license.
4  */
5 
6 
7 #include <stdio.h>
8 #include <string.h>
9 
10 
11 int
12 main(int argc, char** argv)
13 {
14 	char a[] = { -26, '\0' };
15 	char b[] = { '.', '\0' };
16 
17 	printf("strcmp(): %d\n", strcmp(a, b));
18 	printf("memcmp(): %d\n", memcmp(a, b, 1));
19 	printf("strncmp(): %d\n", strncmp(a, b, 1));
20 	printf("strcasecmp(): %d\n", strcasecmp(a, b));
21 	printf("strncasecmp(): %d\n", strncasecmp(a, b, 1));
22 
23 	return 0;
24 }
25