lineoffset and itemoffset alltogether

Rob Cozens rcozens at pon.net
Wed Dec 10 15:43:54 EST 2003


>Hi all,
>
>Is there a function that returns at the same time the lineoffset
>and the itemoffset of a searched string (for instance in the
>form 15,4 for "item 4 of line 15") ?
>Or is there a (fast) way to do that, instead of checking each
>item of the line once the lineoffset has been found ?

Is this what you want, JB?

function lineItemOffset targetText,searchString
    get lineOffset(targetText,searchString)
    if it is empty then return empty
    return it&comma&itemOffset(targetText,line it of searchString)
end lineItemOffset

-- 

Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.net/who.htm

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)


More information about the Use-livecode mailing list