[REBOL] Re: getting rid of empty string in a block.
From: al:bri:xtra at: 14-Mar-2002 7:31
Stephane wrote:
> str: copy []
> foreach l (sort read/lines %my-file) [append str join l "^/"]
>
> But I haven't thought of blank line which are empty string in the sort
read/lines resulting block.
str: copy []
foreach Line sort read/lines %my-file [
if not empty? Line [
append str join Line newline
]
]
> >> foreach i t [if length? i <> 0 [print i]]
Try:
foreach i t [if 0 <> length? i [print i]]
Andrew Martin
ICQ: 26227169 http://valley.150m.com/