diff options
| author | Tyge Løvset <[email protected]> | 2023-02-08 16:16:49 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-02-08 17:18:24 +0100 |
| commit | c4441f5fc665194fbd7a894a67a64a08c3beac42 (patch) | |
| tree | 82f231b6e8fcb75625166f98aa785baaa265a3d6 /misc/examples/utf8replace_c.c | |
| parent | 673dd5319a488d4b702b94dd9aeda4e497ae4fbc (diff) | |
| download | STC-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/utf8replace_c.c')
| -rw-r--r-- | misc/examples/utf8replace_c.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/misc/examples/utf8replace_c.c b/misc/examples/utf8replace_c.c index 035c5b00..adb8c042 100644 --- a/misc/examples/utf8replace_c.c +++ b/misc/examples/utf8replace_c.c @@ -1,7 +1,9 @@ #include <stc/cstr.h> -int main() { - c_AUTO (cstr, hello, str) { +int main() +{ + c_auto (cstr, hello, str) + { hello = cstr_lit("hell😀 w😀rld"); printf("%s\n", cstr_str(&hello)); @@ -13,7 +15,7 @@ int main() { ); printf("%s\n", cstr_str(&hello)); - c_FOREACH (c, cstr, hello) + c_foreach (c, cstr, hello) printf("%.*s,", c_SVARG(c.u8.chr)); str = cstr_lit("scooby, dooby doo"); |
