fn span(ptr: anytype) Span(@TypeOf(ptr))

Takes a sentinel-terminated pointer and returns a slice, iterating over the memory to find the sentinel and determine the length. Pointer attributes such as const are preserved. [*c] pointers are assumed to be non-null and 0-terminated.

Parameters

ptr: anytype,