LuaScript Xojo Plugin |

# LuaScriptContext.GetLength Method

If checking length of a string element then this returns the string length, if checking the length of a Lua table then this returns the same as the Lua # operator returns.

GetLength(
index as Integer) as Integer

#### Parameters

index
  The index of the element in the stack to fetch from. -1 is the element at top of the stack, the last element pushed onto the stack.

#### Returns

Integer
  The length or zero if use of length was not supported for the selected element.

#### Remarks

#### See Also

LuaScriptContext Class