On Thu, 13 Aug 2015, Jürgen Hestermann wrote:

Am 2015-08-13 um 11:55 schrieb Mattias Gaertner:

If you know that you have a valid UTF-8 string you can simply use the
first byte of each codepoint (as you pointed out). So, for that case a
faster function can be added.
Maybe UTF8QuickCharLen or something like that.

Determining the character length of a invalid UTF-8 string is quite useless.

Because it's not about getting a correct result then, but about not crashing 
due to invalid memory access.

Many safety leaks are due to invalid memory access.

Michael.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to