Thomas Kuehne wrote: > Challenge: > Provide a D implementation that firsts converts to UTF-32 and has > shorter runtime than the code below: I don't know about that, but the code below isn't optimal <g>. Replace the sar's with a lookup of the 'stride' of the UTF-8 character (see std.utf.UTF8stride[]). An implementation is std.utf.toUTFindex().