Joe, Lindsay....Yes! 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 (<> Ch " ")
               (if (= Last_ch " ")
                  (link (pack " " Ch))
                  (link Ch)))
            (setq Last_ch Ch))))))

Best Regards
Dean

On 18 February 2017 at 06:39, Lindsay John Lawrence <
lawrence.lindsayj...@gmail.com> wrote:

>
> (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 everywhere spaces spaces r so squuare"
>
> /Lindsay
>

Reply via email to