summaryrefslogtreecommitdiffhomepage
path: root/examples/splitstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/splitstr.c')
-rw-r--r--examples/splitstr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/splitstr.c b/examples/splitstr.c
index f2a1dad1..8e976892 100644
--- a/examples/splitstr.c
+++ b/examples/splitstr.c
@@ -6,16 +6,16 @@
int main()
{
- puts("Split with c_foreach_token (csview):");
+ puts("Split with c_fortoken (csview):");
- c_foreach_token (i, "Hello World C99!", " ")
+ c_fortoken (i, "Hello World C99!", " ")
printf("'%.*s'\n", c_ARGsv(i.token));
- puts("\nSplit with c_foreach_match (regex):");
+ puts("\nSplit with c_formatch (regex):");
c_with (cregex re = cregex_from("[^ ]+", 0), cregex_drop(&re))
- c_foreach_match (i, &re, " Hello World C99! ")
+ c_formatch (i, &re, " Hello World C99! ")
printf("'%.*s'\n", c_ARGsv(i.match[0]));
}