ref: 64ed7785525654984f16cc4aadd25bd5e3a3331e
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);