2010/11/15 Michael Schnell <mschn...@lumino.de>: > On 11/14/2010 03:33 PM, Vincent Snijders wrote: >> >> I did not have in mind such a sophisticated UTF8 string >> implementation, that included a translation table for easy indexing. > > I don't think you need a translation table to walk through an UTF-8 String
Maybe I did not understand Thaddy, but to give you O(1) access to the ith character, I was thinking about a a translation table of the utf8 string, with key=index (1..length) and value=offset in bytes to the ith character. Such a translation table would need to created once for the complete loop and can be done in O(N). I cannot imagine another way that a translations table can give you o(1) access. Vincent _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel