Mark Waddingham wrote:

>> I'm using chars instead of codepoints because when I tried it, they
>> both gave the same number. Should I change that?
>
> Both characters and codepoints run the risk of requiring a linear scan
> of the string to calculate the length - strictly speaking his will
> occur if the engine is not sure whether character / codepoint have a
> 1-1 map to codeunits (for example if your string has Unicode chars and
> it hasn't analysed it). Therefore you should definitely use codeunits.

This is an interesting detail. Is it safe to surmise from this that in cases where speed is important we should consider using codeunits instead of chars?

How might we use codeunits with offset()?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 ____________________________________________________________________
 ambassa...@fourthworld.com                http://www.FourthWorld.com


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to