diff options
| author | Tyge Løvset <[email protected]> | 2022-07-31 09:15:36 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-07-31 10:32:12 +0200 |
| commit | 8a5478f7c14d4c7476d36b137fd7d2c8d95f2c13 (patch) | |
| tree | e54045852e198dfbecbd82a55a854698658c4a6b /examples/sview_split.c | |
| parent | 90b4371d8a36ab609c2200289634c171a19f7fff (diff) | |
| download | STC-modified-8a5478f7c14d4c7476d36b137fd7d2c8d95f2c13.tar.gz STC-modified-8a5478f7c14d4c7476d36b137fd7d2c8d95f2c13.zip | |
csview: csview_token(sv, sep, &start): now start > sv.size on last token. Removed usage of c_ARGsv() macro in examples => printf formatting ".*s". csview fully inlined.
Diffstat (limited to 'examples/sview_split.c')
| -rw-r--r-- | examples/sview_split.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/sview_split.c b/examples/sview_split.c index 2c7ce395..155cdc28 100644 --- a/examples/sview_split.c +++ b/examples/sview_split.c @@ -11,8 +11,7 @@ int main() const csview month = csview_token(date, c_sv("/"), &pos); const csview day = csview_token(date, c_sv("/"), &pos); - printf("%" c_PRIsv ", %" c_PRIsv ", %" c_PRIsv "\n", - c_ARGsv(year), c_ARGsv(month), c_ARGsv(day)); + printf("%.*s, %.*s, %.*s\n", c_ARGsv(year), c_ARGsv(month), c_ARGsv(day)); c_auto (cstr, y, m, d) { y = cstr_from_sv(year), m = cstr_from_sv(month), d = cstr_from_sv(day); |
