[fpc-devel] Re: enumerators
vincent.snijders at gmail.com
Mon Nov 15 10:22:05 CET 2010
2010/11/15 Michael Schnell <mschnell at 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.
More information about the fpc-devel