Re: clip and chop down consecutive "internal" white spaces to one space??

2017-02-18 Thread dean
Joe, LindsayYes! they both do it and are MUCH slicker :) than the improvement I managed overnight i.e. moving the clip down into the for loop :) That's great. Thank you very much. (de shrink (Str) (pack (let (Last_ch "A") (make (for Ch (clip (chop Str)) (if

Re: clip and chop down consecutive "internal" white spaces to one space??

2017-02-17 Thread Lindsay John Lawrence
(de trimmr (S C) (default C " ") (glue C (filter '((E) E) (split (chop S) C : (setq Str " spaaaces, spaaaces everywhere spaaaces spaaaces r so squuare ") -> " spaaaces, spaaaces everywhere spaaaces spaaaces r so squuare " : (trimmr (trimmr Str) "a") -> "spaces, spaces

Re: clip and chop down consecutive "internal" white spaces to one space??

2017-02-17 Thread Joe Bogner
fun does this do it? (pack (mapcon '((X) (ifn (= '(" " " ") (head 2 X)) (cons (car X (chop S))) -> " this contains 2 consecutive spaces " On Feb 17, 2017 5:23 PM, "dean" wrote: > I've done this and it works but...is there a slicker way :) > > (setq S " this

clip and chop down consecutive "internal" white spaces to one space??

2017-02-17 Thread dean
I've done this and it works but...is there a slicker way :) (setq S " this contains 2 consecutive spaces ") (de shrink (Str) #can't clip before inner pack so need to pack, chop, clip and re-pack (pack (clip (chop (pack (let (Last_ch " ")