offset broken?

J. Landman Gay jacque at hyperactivesw.com
Sun Feb 23 17:41:24 EST 2014


On 2/23/14, 2:53 PM, Earthednet-wp wrote:
> Folks, Perhaps I missed it in the docs, but I didn't see where it
> said the char count returned by offset was measured from the skipped
> chars count. I do skim, so could have easily missed the fine print.

It's in the last paragraph in the "offset" entry:

"If you specify how many charsToSkip, the offset function skips the 
specified number of characters in the stringToSearch. The value returned 
is relative to this starting point instead of the beginning of the 
stringToSearch."

One of the syntax examples shows it, though it would be easy to miss if 
you weren't looking for it:

   offset("b","abacadabra",2) -- returns 6

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list