lua_tostring

Function lua_tostring 

Source
pub unsafe fn lua_tostring(L: *mut lua_State, idx: c_int) -> *const c_char
Expand description

Attempts to convert the value at the given index to a string, and return it.

This function attempts to convert the value at the given index to a string, returning a pointer to the string if successful, or null if the conversion failed.

If the value is a string, it will be returned as is. If the value is a number, it will be converted into a string and the stack will be modified.