summaryrefslogtreecommitdiffhomepage
path: root/examples/utf8replace_c.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-08-15 16:54:56 +0200
committerTyge Løvset <[email protected]>2022-08-15 16:54:56 +0200
commitbf3c50da1a346b56b6846c0f7b9e7a222f602c2f (patch)
tree3284252adec60cce3bd4d7c5876fe2d8a3d9506e /examples/utf8replace_c.c
parente9e405dbe1ec3eb51ce2e3398b3c24583293892e (diff)
downloadSTC-modified-bf3c50da1a346b56b6846c0f7b9e7a222f602c2f.tar.gz
STC-modified-bf3c50da1a346b56b6846c0f7b9e7a222f602c2f.zip
More iterator fixes. Make sure cvec/cdeq find_in() return end() iterator if item not found. Small cstr API change to u8_replace*.
Diffstat (limited to 'examples/utf8replace_c.c')
-rw-r--r--examples/utf8replace_c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/utf8replace_c.c b/examples/utf8replace_c.c
index 1bee9b44..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));