ArrayList<T>

数组,封装自std::vector<T>,一般用于返回值。

属性

属性

int length 【只读】数组长度。

T [index] 读取或写入指定下标的数组元素。index有效区间为[1, length]。

使用

for i = 1, arrayList.length do
    local element = arrayList[i]
    -- do something on this element
end

Last updated

Was this helpful?