Skip to main content

luaur_repl_cli/functions/
is_method_or_function_char.rs

1use core::ffi::c_char;
2
3pub unsafe fn is_method_or_function_char(s: *const c_char, len: i64) -> bool {
4    if len != 1 || s.is_null() {
5        return false;
6    }
7
8    let c = *s as u8 as char;
9    c.is_ascii_alphanumeric() || c == '.' || c == ':' || c == '_'
10}