summaryrefslogtreecommitdiffstats
path: root/man3/strsep.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/strsep.3')
-rw-r--r--man3/strsep.310
1 files changed, 5 insertions, 5 deletions
diff --git a/man3/strsep.3 b/man3/strsep.3
index 6d7c66176..19caafeb1 100644
--- a/man3/strsep.3
+++ b/man3/strsep.3
@@ -133,24 +133,24 @@ which, however, doesn't discard multiple delimiters or empty tokens:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
int
main(int argc, char *argv[])
{
char *token, *subtoken;
-
+\&
if (argc != 4) {
fprintf(stderr, "Usage: %s string delim subdelim\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
for (unsigned int j = 1; (token = strsep(&argv[1], argv[2])); j++) {
printf("%u: %s\en", j, token);
-
+\&
while ((subtoken = strsep(&token, argv[3])))
printf("\et \-\-> %s\en", subtoken);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE