Isaac Freund
cd7b5a3718
std/mem: add sliceTo(), deprecate spanZ(), lenZ()
...
The current spanZ() function will not scan for a 0 terminator if the
type is not 0 terminated. This encourages using 0 terminated array
types to bind C arrays which hold 0 terminated strings. However, this is
a big footgun as nothing in the C type system guarantees there to be a
0 terminator at the end of the array and if there is none this becomes
Illegal Behavior in Zig.
To solve this, deprecate spanZ() and lenZ(), adding a new sliceTo()
function that always scans for the given terminator even if the type is
not sentinel terminated.
2021-05-12 11:24:49 +02:00
..
2021-05-08 15:15:30 +03:00
2021-05-01 08:17:17 +02:00
2021-05-11 12:33:48 +02:00
2021-05-08 15:15:30 +03:00
2021-05-09 18:20:43 +02:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-05-11 12:33:48 +02:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-02-25 22:20:30 +02:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-05-11 15:49:53 +02:00
2021-05-08 15:15:30 +03:00
2021-05-11 15:15:00 -04:00
2021-05-03 12:32:13 +02:00
2020-12-31 15:45:24 -08:00
2021-05-08 15:15:30 +03:00
2020-12-31 15:45:24 -08:00
2021-01-07 23:48:58 -08:00
2021-05-08 15:15:30 +03:00
2021-05-10 19:22:31 +09:00
2021-05-10 21:00:10 +02:00
2021-05-11 16:14:23 +03:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2020-12-31 15:45:24 -08:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-05-11 12:33:48 +02:00
2021-05-08 15:15:30 +03:00
2021-02-24 21:29:23 -07:00
2021-01-22 15:46:58 +01:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-04-25 19:10:11 +02:00
2020-12-31 15:45:24 -08:00
2021-04-12 17:18:56 -04:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2020-12-31 15:45:24 -08:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-03-28 14:32:34 +02:00
2021-05-08 15:15:30 +03:00
2020-12-31 15:45:24 -08:00
2021-05-08 15:15:30 +03:00
2021-02-16 23:20:46 +01:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-02-24 21:29:23 -07:00
2021-04-21 06:49:34 +02:00
2021-05-08 15:15:30 +03:00
2021-05-12 11:24:49 +02:00
2021-05-11 22:22:21 +02:00
2021-05-08 15:15:30 +03:00
2021-02-21 11:56:14 +02:00
2021-05-08 15:15:30 +03:00
2021-05-11 12:33:48 +02:00
2021-05-08 15:15:30 +03:00
2021-02-01 15:27:39 -05:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-03-12 19:31:59 -05:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2020-12-31 15:45:24 -08:00
2021-05-04 18:52:53 +02:00
2021-04-25 21:15:02 +09:00
2021-04-28 10:26:47 -07:00
2021-05-08 15:15:23 +03:00
2021-05-03 12:32:13 +02:00
2021-05-08 15:15:30 +03:00
2021-05-08 15:15:30 +03:00
2021-01-22 15:46:58 +01:00
2021-05-08 15:15:30 +03:00
2021-05-10 19:22:31 +09:00
2021-05-08 15:15:30 +03:00