clay/generator/array_get_slice.template.c

3 lines
164 B
C
Raw Normal View History

2024-10-22 07:41:35 +00:00
$TYPE$ *$NAME$Slice_Get($NAME$Slice *slice, int index) {
return Clay__Array_RangeCheck(index, slice->length) ? &slice->internalArray[index] : $DEFAULT_VALUE$;
}