diff options
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(""); } } |
