Function toboolean

Source
pub unsafe extern "C" fn toboolean(
    state: lua_State,
    index: i32,
) -> bool
Expand description

Converts the Lua value at the given acceptable index to a C boolean value (0 or 1). Like all tests in Lua, toboolean (lua_toboolean) returns true for any Lua value different from false and nil; otherwise it returns false. It also returns false when called with a non-valid index.