Thank you for all who replied with the EXCELLENT suggestions:

On Tuesday, October 21, 2003, at 07:11 PM, Jan Schenkel wrote:

Try the following :

function fDeleteLine pList,pString
  if pList is empty then return empty
  if pString is empty then return pList
  set the wholeMatches to true
  put lineOffset(pString, pList) into tOffset
  return line 1 to (tOffset - 1) of pList & \
     return & line (tOffset + 1) to -1 of pList
end fDeleteLine


On Tuesday, October 21, 2003, at 07:27 PM, [EMAIL PROTECTED] wrote:


Don't bother with a repeat loop at all.

function fDeleteLine pList,pString
if pList is empty then return empty
if pString is empty then return pList
put offset ((return & pString & return),(return & pList & return)) into
Fred
if Fred = 0 then
# pString isn't in pList at all
return empty
else
put the number of lines in char 1 to Fred of pList into George
delete line George of pList
return pList
end if
end fDeleteLine


On Tuesday, October 21, 2003, at 07:20 PM, [EMAIL PROTECTED] wrote:

By far the fastest should be this though:
If you can predict what the line will be you can also use a replace (
thisstring & CR) with "" in mylist.
The other choice is to use the regular expression if your guess is not
exact but grepable...

I'm going to try the 3 out, and see if one is any faster/easier to maintain than the others!


Many, many thanks!

Kindest Regards,
--
Igor de Oliveira Couto
----------------------------------
----------------------------------
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to