Function: erc-split-multiline-safe
erc-split-multiline-safe is a byte-compiled function defined in
erc.el.gz.
Signature
(erc-split-multiline-safe STRING)
Documentation
Split STRING, containing multiple lines and return them in a list.
Do it only for STRING as the complete input, do not carry unfinished strings over to the next call.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc-split-multiline-safe (string)
"Split STRING, containing multiple lines and return them in a list.
Do it only for STRING as the complete input, do not carry unfinished
strings over to the next call."
(let ((l ())
(i0 0)
(doit t))
(while doit
(let ((i (string-match "\r?\n" string i0))
(s (substring string i0)))
(cond (i (setq l (cons (substring string i0 i) l))
(setq i0 (match-end 0)))
((> (length s) 0)
(setq l (cons s l))(setq doit nil))
(t (setq doit nil)))))
(nreverse l)))