Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: newlines

From: brett:codeconscious at: 9-Nov-2001 3:14

Doc, I applied your medicine to my functions too and they've been healed. Thanks! Your little workaround worked a treat. Here's my final contribution then for small variations on squishing down repeated newlines: BDH3: function [s][p a b][ p: s while [parse/all p [ to "..." 2 skip a: opt [some #"." b: (remove/part a b)] to end]][p: a] RETURN s ] BDH4: function [s][p a b][ parse/all s [ any [to "..." 2 skip a: opt [some #"." b: (remove/part a b)] :a] ] RETURN s ] Based on my rough testing (in a box that has not been rebooted in a while), they are a little bit faster than my previous efforts. Brett.