diff options
| author | Tyge Løvset <[email protected]> | 2022-08-17 09:35:40 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-08-17 09:35:40 +0200 |
| commit | 0681b8a9af2ac6041e937bc8ca7bc8d496dcc0d4 (patch) | |
| tree | 03825b177d4d5259f629957b751b000e1b224db1 /examples/utf8replace_c.c | |
| parent | 17f1d2ed83952df00525f4be1d30a6c12e04a0f6 (diff) | |
| parent | a06463c2f0747bc142a9d5b2bf455c64aaf39890 (diff) | |
| download | STC-modified-0681b8a9af2ac6041e937bc8ca7bc8d496dcc0d4.tar.gz STC-modified-0681b8a9af2ac6041e937bc8ca7bc8d496dcc0d4.zip | |
Merge pull request #34 from tylov/iter_exp_dont_use
VERSION 4.0 RC
Diffstat (limited to 'examples/utf8replace_c.c')
| -rw-r--r-- | examples/utf8replace_c.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/utf8replace_c.c b/examples/utf8replace_c.c index 792654b6..e7659cfd 100644 --- a/examples/utf8replace_c.c +++ b/examples/utf8replace_c.c @@ -8,7 +8,7 @@ int main() { printf("%s\n", cstr_str(&hello)); /* replace second smiley at utf8 codepoint pos 7 */ - cstr_u8_replace_at(&hello, 7, 1, c_sv("🐨")); + cstr_u8_replace(&hello, cstr_find(&hello, "😀rld"), 1, c_sv("🐨")); printf("%s\n", cstr_str(&hello)); @@ -16,7 +16,7 @@ int main() { printf("%s\n", cstr_str(&hello)); c_foreach (c, cstr, hello) - printf("%.*s,", c_ARGsv(c.chr)); + printf("%.*s,", c_ARGsv(c.u8.chr)); puts(""); } } |
