dchar front(char[] s) {
uint c = s[0];
ubyte p = ~s[0];
if (p>>7)
return c;
c = c<<8 | s[1];
if (p>>5)
return c;
c = c<<8 | s[2];
if (p>>4)
return c;
return c<<8 | s[3];
}
- Challenge: write a really really small front() for UTF... Andrei Alexandrescu
- Re: Challenge: write a really really small front(... Dmitry Olshansky
- Re: Challenge: write a really really small fr... Andrei Alexandrescu
- Re: Challenge: write a really really smal... Dmitry Olshansky
- Re: Challenge: write a really really ... Andrei Alexandrescu
- Re: Challenge: write a really re... Anonymous
- Re: Challenge: write a reall... Andrei Alexandrescu
- Re: Challenge: write a really re... Michel Fortin
- Re: Challenge: write a really re... Vladimir Panteleev
- Re: Challenge: write a really really small front(... Mike
- Re: Challenge: write a really really small fr... Walter Bright
- Re: Challenge: write a really really small fr... Simen Kjærås
- Re: Challenge: write a really really small fr... Dmitry Olshansky
- Re: Challenge: write a really really smal... Daniel N
- Re: Challenge: write a really really ... Daniel N
- Re: Challenge: write a really re... Iain Buclaw
