]> git.ozlabs.org Git - ccan/blob - ccan/string/_info.c
873d36075a8dd3e88e0e5197d497bb483f0d7ef0
[ccan] / ccan / string / _info.c
1 #include <stdio.h>
2 #include <string.h>
3 #include "config.h"
4
5 /**
6  * string - string helper routines
7  *
8  * This is a grab bag of modules for string operations, designed to enhance
9  * the standard string.h.
10  *
11  * Example:
12  *      #include "string/string.h"
13  *
14  *      int main(int argc, char *argv[])
15  *      {
16  *              if (argv[1] && streq(argv[1], "--verbose"))
17  *                      printf("verbose set\n");
18  *              if (argv[1] && strstarts(argv[1], "--"))
19  *                      printf("Some option set\n");
20  *              if (argv[1] && strends(argv[1], "cow-powers"))
21  *                      printf("Magic option set\n");
22  *              return 0;
23  *      }
24  *
25  * Licence: LGPL (2 or any later version)
26  */
27 int main(int argc, char *argv[])
28 {
29         if (argc != 2)
30                 return 1;
31
32         if (strcmp(argv[1], "depends") == 0) {
33                 printf("ccan/talloc\n");
34                 printf("ccan/noerr\n");
35                 return 0;
36         }
37
38         return 1;
39 }