API Reference


Brew Release
Brew MP 1.0.2
See Also
ILua_PushString(), ILua_ToString(), ILuaEx_CheckLString()
Converts the Lua value at the given valid index to a C string. The Lua value must be a string or a number, otherwise the return value is NULL. Unlike ILua_ToString(), this function only returns a pointer to the string within the Lua VM, and is only valid as long as the value exists on the stack.
As with strings in Lua, this may return a string containing embedded zeros.
Note that if the value is a number, this function will change the actual value in the stack to a string.
  • pif
    a pointer to the ILuaEx object
  • nIndex
    the stack index of the object
  • pnLen
    optional pointer to an integer that will be set to the length of the string upon return
   const char *ILuaEx_ToLString(ILuaEx *pif, int nIndex, int *pnLen)
A pointer to the zero-terminated string within the Lua VM stack. Note that this pointer is valid only if the string remains on the stack, otherwise the garbage collector may render the contents of the location invalid.
  • Follow