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
(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 ever
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 contains 2 consecutive spaces
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 " ")