Replace command
Mark Schonewille
m.schonewille at economy-x-talk.com
Sat Apr 10 14:51:51 EDT 2010
Peter,
As David pointed out, you can do that easily with the replace command.
I thought I'll mention this to avoid confusion.
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
Share the clipboard of your computer with other computers on a local
network with Clipboard Link
http://clipbaordlink.economy-x-talk.com
Op 10 apr 2010, om 20:28 heeft Peter Brigham MD het volgende geschreven:
>
> The code above will find and replace the first occurrence of the
> string. For access to all the occurrences, use this handler:
>
> function offsets str,cntr
> -- returns a comma-delimited list
> -- of all the offsets of str in cntr
> if str is not in cntr then return 0
> put "" into offsetList
> put 0 into startPoint
> repeat
> put offset(str,cntr,startPoint) into thisOffset
> if thisOffset = 0 then exit repeat
> add thisOffset to startPoint
> put startPoint & comma after offsetList
> end repeat
> delete last char of offsetList
> return offsetList
> end offsets
>
> -- Peter
>
> Peter M. Brigham
> pmbrig at gmail.com
> http://home.comcast.net/~pmbrig
>
More information about the use-livecode
mailing list