diff options
| author | tylov <[email protected]> | 2023-07-20 15:09:10 +0200 |
|---|---|---|
| committer | tylov <[email protected]> | 2023-07-20 15:12:29 +0200 |
| commit | 900295256d825fc323149cd223c49787f32a3696 (patch) | |
| tree | 6c79cf4209e3975bb6865e2940b9cb56ea469c73 /misc/examples/splitstr.c | |
| parent | 224a04f7fa7549ed94d2a1415eb25829e39a7cca (diff) | |
| download | STC-modified-900295256d825fc323149cd223c49787f32a3696.tar.gz STC-modified-900295256d825fc323149cd223c49787f32a3696.zip | |
Moved examples to sub-directories. Added cotask1.c cotask2.c examples.
Diffstat (limited to 'misc/examples/splitstr.c')
| -rw-r--r-- | misc/examples/splitstr.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/misc/examples/splitstr.c b/misc/examples/splitstr.c deleted file mode 100644 index ef7ed174..00000000 --- a/misc/examples/splitstr.c +++ /dev/null @@ -1,21 +0,0 @@ -#include <stdio.h> -#define i_import // cstr + utf8 functions -#include <stc/cregex.h> -#define i_implement -#include <stc/csview.h> - -int main(void) -{ - puts("Split with c_fortoken (csview):"); - - c_fortoken (i, "Hello World C99!", " ") - printf("'%.*s'\n", c_SV(i.token)); - - puts("\nSplit with c_formatch (regex):"); - - cregex re = cregex_from("[^ ]+"); - c_formatch (i, &re, " Hello World C99! ") - printf("'%.*s'\n", c_SV(i.match[0])); - - cregex_drop(&re); -} |
