Strip
Klaus Major
klaus.major at metascape.org
Wed Jul 10 12:51:01 EDT 2002
Bonsoir Yves,
> Hi,
>
> I get a problem with filter command
>
> I have a fld with lines.
> some lines end with "(*)"
>
> something like :
> xxx xxxxxx xxx
> xxx xxx (*)
> xxx xxxxxx xxx
> xxx xxxxxx (*)
> xxx xxxxxx xxxX
>
>
> I'd like to strip the "(*)" at the end of the lines
>
> so I write
>
> put fld "myData" into tData
> filter tData with ??????
>
> Heer I need your help. I don't find the trick !!
> Thank you for your help.
> -- Greetings.
>
> Yves COPPE
try this
...
put fld "myData" into tData
repeat for each line l in tData
if char -3 to -1 of l is not "(*)" then
put l & CR after cleanedup
end if
end repeat
put cleanedup into fld "tData"
...
Is billion times faster than parsing the field and deleting
these chars in the field directly.
Au revoir
Klaus Major
klaus.major at metascape.org
More information about the use-livecode
mailing list