diff options
| author | tylov <[email protected]> | 2023-08-13 23:15:45 +0200 |
|---|---|---|
| committer | tylov <[email protected]> | 2023-08-13 23:15:45 +0200 |
| commit | 25dc58db206714dc02c1ae0548f6ba7dd3519d29 (patch) | |
| tree | dcf65b08300d82c4d6752284d5c0a5a00507f07f /misc/examples/strings/utf8replace_c.c | |
| parent | 8bb2f5618e4cefe668a663936354cf53191f2129 (diff) | |
| download | STC-modified-25dc58db206714dc02c1ae0548f6ba7dd3519d29.tar.gz STC-modified-25dc58db206714dc02c1ae0548f6ba7dd3519d29.zip | |
API CHANGES:
Changed csview: becomes a null-terminated string view.
Added csubview: a null-terminated string view/span, like previous csview.
Note that csview works like a csubview, so not much compability issues should arise.
However, some functions have changed from _sv suffix to _ss.
Diffstat (limited to 'misc/examples/strings/utf8replace_c.c')
| -rw-r--r-- | misc/examples/strings/utf8replace_c.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/examples/strings/utf8replace_c.c b/misc/examples/strings/utf8replace_c.c index 1d54486f..03a0442f 100644 --- a/misc/examples/strings/utf8replace_c.c +++ b/misc/examples/strings/utf8replace_c.c @@ -10,12 +10,12 @@ int main(void) cstr_u8_replace_at(&hello, cstr_u8_to_pos(&hello, 7), 1, - c_sv("🐨") + c_ss("🐨") ); printf("%s\n", cstr_str(&hello)); c_foreach (c, cstr, hello) - printf("%.*s,", c_SV(c.u8.chr)); + printf("%.*s,", c_SS(c.u8.chr)); cstr str = cstr_lit("scooby, dooby doo"); cstr_replace(&str, "oo", "00"); |
