2010/11/15 Michael Schnell <mschn...@lumino.de>: > On 11/15/2010 10:22 AM, Vincent Snijders wrote: >> >> I cannot imagine another way that a translations table can give you o(1) >> access. >> > Maybe I don't understand the o(1) correctly. Do you think it should be > necessary to access each character in the string with in each iteration in > this way. > > What I meant was: > > A pointer to the first UTF8-Code of the next Unicode character is the > internal invisible loop variable. > > A string containing the multi-Byte code of the current Unicode character is > the visible loop variable. > > Constructing the string and the pointer at the start of each loop is > straight forward (regarding the UTF-8 definition), fast, o(1) and does not > need a table.
I agree, and that is why you need enumerators to make it work. Vincent _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel