Skip to main content

codes

Function codes 

Source
pub fn codes(s: string, lax: option<boolean>) -> function
Expand description

Returns values so that the construction

for p, c in utf8.codes(s) do body end

will iterate over all UTF-8 characters in string s, with p being the position (in bytes) and c the code point of each character. It raises an error if it meets any invalid byte sequence.