clay/generator/array_get_slice.template.c
2024-10-22 20:41:35 +13:00

3 lines
164 B
C

$TYPE$ *$NAME$Slice_Get($NAME$Slice *slice, int index) {
return Clay__Array_RangeCheck(index, slice->length) ? &slice->internalArray[index] : $DEFAULT_VALUE$;
}