diff --git a/src/playdate/bindings/utils.nim b/src/playdate/bindings/utils.nim index f2cb4ce..a4cb91a 100644 --- a/src/playdate/bindings/utils.nim +++ b/src/playdate/bindings/utils.nim @@ -1,5 +1,12 @@ import macros +iterator items*[T](rawField: ptr UncheckedArray[T], len: Natural): T = + ## iterate through a C array + ## To convert to a Nim seq: + ## `cArray.items(count).toSeq` + for i in 0..