Function sentinel [src]

Loads the array type's sentinel value from sentinel_ptr. Returns null if the array type has no sentinel.

Prototype

pub inline fn sentinel(comptime arr: Array) ?arr.child

Parameters

arr: Array

Source

pub inline fn sentinel(comptime arr: Array) ?arr.child { const sp: *const arr.child = @ptrCast(@alignCast(arr.sentinel_ptr orelse return null)); return sp.*; }