diff options
| author | Tyge Lovset <[email protected]> | 2023-02-01 08:38:45 +0100 |
|---|---|---|
| committer | Tyge Lovset <[email protected]> | 2023-02-01 08:38:45 +0100 |
| commit | 6ce6ef3307e52db5813d3c8d6a2cba52df06daf8 (patch) | |
| tree | 25af4be9fcd5e72778715b83ff312e157ca63b59 /misc/examples/cstr_match.c | |
| parent | b677a0c3950b8294ba6458e682a885351273ac08 (diff) | |
| download | STC-modified-6ce6ef3307e52db5813d3c8d6a2cba52df06daf8.tar.gz STC-modified-6ce6ef3307e52db5813d3c8d6a2cba52df06daf8.zip | |
Massive update from unsigned sizes and indices to signed.
Diffstat (limited to 'misc/examples/cstr_match.c')
| -rw-r--r-- | misc/examples/cstr_match.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/examples/cstr_match.c b/misc/examples/cstr_match.c index 116e5dd4..bfb0df6b 100644 --- a/misc/examples/cstr_match.c +++ b/misc/examples/cstr_match.c @@ -5,8 +5,8 @@ int main() { c_WITH (cstr ss = cstr_lit("The quick brown fox jumps over the lazy dog.JPG"), cstr_drop(&ss)) { - size_t pos = cstr_find_at(&ss, 0, "brown"); - printf("%" c_ZU " [%s]\n", pos, pos == c_NPOS ? "<NULL>" : cstr_str(&ss) + pos); + intptr_t pos = cstr_find_at(&ss, 0, "brown"); + printf("%" c_ZI " [%s]\n", pos, pos == c_NPOS ? "<NULL>" : cstr_str(&ss) + pos); printf("equals: %d\n", cstr_equals(&ss, "The quick brown fox jumps over the lazy dog.JPG")); printf("contains: %d\n", cstr_contains(&ss, "umps ove")); printf("starts_with: %d\n", cstr_starts_with(&ss, "The quick brown")); @@ -16,7 +16,7 @@ int main() cstr s1 = cstr_lit("hell😀 w😀rl🐨"); csview ch1 = cstr_u8_chr(&s1, 7); csview ch2 = cstr_u8_chr(&s1, 10); - printf("%s\nsize: %" c_ZU ", %" c_ZU "\n", cstr_str(&s1), cstr_u8_size(&s1), cstr_size(&s1)); + printf("%s\nsize: %" c_ZI ", %" c_ZI "\n", cstr_str(&s1), cstr_u8_size(&s1), cstr_size(&s1)); printf("ch1: %.*s\n", c_ARGSV(ch1)); printf("ch2: %.*s\n", c_ARGSV(ch2)); } |
