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-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-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-08 15:15:30 +03: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-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-02-24 21:29:23 -07: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
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
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-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-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
2020-12-31 15:45:24 -08:00
2021-05-08 15:15:23 +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