19 lines · 548 B · Text
RawDownload
= utfbytes : compute UTF length of complete Unicode characters in a UTF byte sequence     include "sys.m";    sys := load Sys Sys->PATH;     utfbytes: fn(buf: array of byte, n: int): int; Utfbytes examines the n-byte UTF sequence in buf and  returnsthe number of bytes representing complete Unicode characters.The value will be less than n when the region inspected  endswith an incomplete UTF sequence. == diagnosticA  bounds  check error results if n exceeds the length of thearray. == see ALSOsys-intro(2), sys-byte2char(2), utf(6)