clay/generator/array_get.template.c
2024-08-23 16:11:56 +12:00

3 lines
154 B
C

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