summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/splitstr.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-02-08 16:16:49 +0100
committerTyge Løvset <[email protected]>2023-02-08 17:18:24 +0100
commitc4441f5fc665194fbd7a894a67a64a08c3beac42 (patch)
tree82f231b6e8fcb75625166f98aa785baaa265a3d6 /misc/examples/splitstr.c
parent673dd5319a488d4b702b94dd9aeda4e497ae4fbc (diff)
downloadSTC-modified-c4441f5fc665194fbd7a894a67a64a08c3beac42.tar.gz
STC-modified-c4441f5fc665194fbd7a894a67a64a08c3beac42.zip
Changed to use lowercase flow-control macros in examples (uppercase will still be supported). Improved many examples to use c_make() to init containers.
Diffstat (limited to 'misc/examples/splitstr.c')
-rw-r--r--misc/examples/splitstr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/misc/examples/splitstr.c b/misc/examples/splitstr.c
index 43309634..4705696c 100644
--- a/misc/examples/splitstr.c
+++ b/misc/examples/splitstr.c
@@ -5,15 +5,15 @@
int main()
{
- puts("Split with c_FORTOKEN (csview):");
+ puts("Split with c_fortoken (csview):");
- c_FORTOKEN (i, "Hello World C99!", " ")
+ c_fortoken (i, "Hello World C99!", " ")
printf("'%.*s'\n", c_SVARG(i.token));
- puts("\nSplit with c_FORMATCH (regex):");
+ puts("\nSplit with c_formatch (regex):");
- c_WITH (cregex re = cregex_from("[^ ]+"), cregex_drop(&re))
- c_FORMATCH (i, &re, " Hello World C99! ")
+ c_with (cregex re = cregex_from("[^ ]+"), cregex_drop(&re))
+ c_formatch (i, &re, " Hello World C99! ")
printf("'%.*s'\n", c_SVARG(i.match[0]));
}