#[no_mangle]
pub unsafe extern "C" fn nstd_core_slice_get(
    slice: &NSTDSlice,
    pos: usize
) -> NSTDAny
Expand description

Gets a pointer to an element from a slice.

Note

The returned element pointer can quickly become a dangling pointer if the slice’s memory gets reallocated or deallocated, so it is advised to create a copy of the element after getting it.

Parameters

  • const NSTDSlice *const slice - The slice.

  • const NSTDUSize pos - The position of the element to get.

Returns

NSTDAny element - Pointer to the element.