repeat loop and formatting question
Mark Smith
lists at futilism.com
Fri Nov 14 17:09:35 EST 2008
How about
put fld 1 into tText
replace "ck" with "<font><b>ck</b></font>" in tText
replace "ch" with "<font><b>ch</b></font>" in tText
replace "oa" with "<font><u>ch</u></font>" in tText
replace "oo" with "<font><u>oo</u></font>" in tText
...
set the htmltext of fld 1 to tText
Best,
Mark
On 14 Nov 2008, at 21:55, Mark Swindell wrote:
> What would be the most efficient structure and syntax to achieve
> the following?:
>
> A text field containing several paragraphs. I want to run through
> the field, finding and formatting certain strings, all occurrences
> of a list of certain letter combinations:
>
> example, all occurrences of
> "ck" = bold
> "ch" = bold
> "oa" = underline
> "oo" = underline
> etc.
>
> The repeat loops I have tried run slowly and there are too many
> unnecessary passes (it seems). I know there must be a more
> succinct, efficient statement that should work.
>
> Any suggestions would be appreciated.
>
> Thanks,
> Mark
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list