Re: Fast UTF-8 strlen function



randyhyde@xxxxxxxxxxxxx wrote:
Is there a fast UTF-8 string length function floating around? I've been
playing around with UTF-8 lately (after the recent UTF-8 interest on
this board) and I'm wondering if there are some code examples (not
unlike the zstring length function typically found in the optimization
manuals) of a high-performance string length function for UTF-8?
Obviously, such a function is going to be the basis of a UTF-8 string
library module, so that seems like a good place to start.

BTW, HLA v1.x seems to handle UTF-8 string data just fine. Of course,
the library modules aren't all going to work properly (e.g., str.len),
but the basic support for UTF-8 is there.  I don't have any plans of
adding UTF-8 support to the existing HLA standard library, but I may as
well add it to HLA v2.0 as the main issues is one of supplying
appropriate library routines (both in the HLA stdlib and in the HLA
compile-time language).

Cheers,
Randy Hyde


If you're going with new library routines, why not use UTF-32 instead?

--
[kain]
http://www.geocities.com/kahlinor
.