ref: 16ff07c376dd521c5516f81f223ab4d1b4cb356d
dir: /sys/src/cmd/unix/u9fs/utflen.c/
#include <plan9.h>
int
utflen(char *s)
{
int c;
long n;
Rune rune;
n = 0;
for(;;) {
c = *(uchar*)s;
if(c < Runeself) {
if(c == 0)
return n;
s++;
} else
s += chartorune(&rune, s);
n++;
}
return 0;
}