ref: ab269ebae7e261ea53a0c482cd1dd6fe66754794
dir: /3rd/utf/utf.h/
#pragma once enum { Runeself = 0x80, Runeerror = 0xfffd, Runemax = 0x10ffff, UTFmax = 4, }; typedef u32int Rune; int chartorune(Rune *rune, const char *str); int runetochar(char *str, const Rune *rune); int runenlen(const Rune *r, int nrune) sl_purefn; int fullrune(const char *str, int n) sl_purefn; int runelen(Rune c) sl_constfn; Rune tolowerrune(Rune c) sl_constfn; Rune toupperrune(Rune c) sl_constfn; Rune totitlerune(Rune c) sl_constfn; int islowerrune(Rune c) sl_constfn; int isupperrune(Rune c) sl_constfn; int isalpharune(Rune c) sl_constfn; int istitlerune(Rune c) sl_constfn; int isspacerune(Rune c) sl_constfn; int isdigitrune(Rune c) sl_constfn; int utfnlen(const char *s, long m);