Translate metadata to field content
Richard Gaskin
ambassador at fourthworld.com
Fri Feb 21 12:22:25 EST 2020
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
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list