On Mon, Nov 15, 2010 at 18:38, Michael Schnell <mschn...@lumino.de> wrote:
> On 11/13/2010 08:56 PM, Hans-Peter Diettrich wrote:
>>
>>
>> The comparison in the UTF-8 string example is very questionable. First
>> ch(i) is not equivalent to ch, not even closely related, and the claim of
>> O(N^2) operations deserves an proof - IMO it's simply wrong.
>
> With UTF-8 strings and friends would it not be appropriate to have the loop
> variable be a string containing the multiple bytes of the Unicode character
> ?

Actually, I do not think so. I believe that an integer containing the codepoint
is preferable implementation. Either way, of course, the quadratic complexity
of for..to loop remains.

-- 
Alexander S. Klenin
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to