dchar front(char[] s) {
dchar c = s[0];
if (!(c & 0x80))
return c;
byte b = (c >> 4) & 3;
b += !b;
c &= 63 >> b;
char *p = s.ptr;
do {
p++;
c = c << 6 | *p & 63;
} while(--b);
return c;
}
- Re: Challenge: write a really really small fr... monarch_dodra
- Re: Challenge: write a really really small front() for... dnspies
- Re: Challenge: write a really really small front(... Andrei Alexandrescu
- Re: Challenge: write a really really small front() for... John Colvin
- Re: Challenge: write a really really small front() for... John Colvin
- Re: Challenge: write a really really small front() for... John Colvin
- Re: Challenge: write a really really small front() for... Dmitry Olshansky
- Re: Challenge: write a really really small front(... Dmitry Olshansky
- Re: Challenge: write a really really small front() for... anonymous
