Array:get()method
Get the Array value stored at the given position.
Return value
This method returns the value stored in the Array at the given position.Example
--! luart-extensions
import c
-- Creates a 2 dimensions C array with 3 rows of 4 chars
local CharArray = c.Array("c", 3, 4)
local array = CharArray {
{ "a", "b", "c", '\0' },
{ "d", "e", "f", '\0' },
{ "g", "h", "i", '\0' }
}
print(array:get(0, 0)) -- outputs "a"