Skip to main content

check_option

Function check_option 

Source
pub fn check_option(
    state: &mut LuaState,
    arg: i32,
    def: Option<&[u8]>,
    lst: &[&[u8]],
) -> Result<usize, LuaError>
Expand description

Check that arg is one of the strings in lst and return its index. If def is Some it is used as default when arg is absent/nil.