Welcome to the CHICKEN Scheme pasting service
char->utf8-length added by Kooda on Sun Aug 9 01:35:33 2020
;; Shameless edit of ##sys#char->utf8-string (define (char->utf8-length c) (let ([i (char->integer c)]) (cond ((<= i #x7F) 1) ((<= i #x7FF) 2) ((<= i #xFFFF) 3) ((<= i #x1FFFFF) 4) (else (error "UTF-8 codepoint out of range:" i)))))