Skip to main content

open_utf8

Function open_utf8 

Source
pub fn open_utf8(state: &mut LuaState) -> Result<usize, LuaError>
Expand description

Open the utf8 library.

Registers all functions from FUNCS into a new table, then sets utf8.charpattern to the byte-string pattern matching one UTF-8 sequence. The pattern’s lead-byte ceiling is version-split: 5.3 stops at \xF4 (≤ MAX_UNICODE), 5.4+ extend it to \xFD (≤ MAX_UTF).