Not broken, just not valid https - change it to plain http and you should be fine: http://www.theswamp.org/index.php?topic=1392.0
Sorry about my misunderstanding.
Well thats some hefty routine (I expected just some short and cute subfoo).
My main has just informative purpose, but the focus here is on this subfoo.
Back on topic, here's an old one of mine, just looking at spaces.
For sure I missed that!
Actually I've expected that you might have something like this, due your tremendous effort of writing lisp routines'n'subfunctions.
I did a small modification here, so if the following character was used ' • ' it would write as new-row and would tab(space) the next subrows [see pic] :
(defun SplitStringForLB (n s / a tmp r flg)
(setq tmp "")
(while (/= "" s)
(setq a (substr s 1 1))
(or
(and (>= (strlen tmp) n) (member a '(" " ".")) (setq r (cons (strcat tmp (cond ((= a ".") (setq a "") ".")(""))) r)) (progn (if flg (setq tmp " ") (setq tmp "")) t))
(and (= a "\n") (progn (setq flg nil) t) (setq r (cons tmp r)) (setq tmp ""))
(and (= a "•") (progn (setq flg t) t) (setq r (cons tmp r)) (setq tmp ""))
); or
(setq tmp ('((a b) (if (and (= "" a) (= " " b)) a (strcat a b))) tmp a))
(setq s (substr s 2))
); while
(reverse ('((a b) (if (/= "" a) (cons a b) b)) tmp r))
); defun SplitStringForLB
So the above yields:
_$ (SplitStringForLB 12 "• This would be the first thing • This is the second thing • This is the third thing")
>>
("" "• This would" " be the first" " thing "
"• This is the" " second thing" " "
"• This is the" " third thing"
)
; Proper return would be (I think) :
( "• This would" " be the first" " thing "
"• This is the" " second thing"
"• This is the" " third thing"
)
_$ (SplitStringForLB 12 "• This would be the first thing • This is the second thing\nthis is a new row • This is the third thing")
>>
("" "• This would"
" be the first"
" thing "
"• This is the"
" second thing"
"\nthis is a new"
"row "
"• This is the"
" third thing"
)
Which I agree is 'buggy' so theres a way of improvement.
But still good to visualise in the list_box: