pub fn pop(self: *Self) ?T
Remove and return the last element from the list, or return null if list is empty. Invalidates pointers to fields of the removed element.
null
self: *Self
331 332 333 334 335 336
pub fn pop(self: *Self) ?T { if (self.len == 0) return null; const val = self.get(self.len - 1); self.len -= 1; return val; }
Remove and return the last element from the list, or return
nullif list is empty. Invalidates pointers to fields of the removed element.