retroforth/vm/nga-c/utf32.c
crc d008cfc764 nga-c: begin implementing utf32 string functions
FossilOrigin-Name: 1761bf66ecc7107bf82d04486c8192c3278b727746e07c4b3cf31dd2a22e5fa4
2024-09-18 14:08:43 +00:00

5 lines
99 B
C

int utf32_length(int *s, int max) {
int l = 0;
while (*s++ != 0 && l < max) l++;
return l;
}