Function: org-irc-ellipsify-description

org-irc-ellipsify-description is a byte-compiled function defined in ol-irc.el.gz.

Signature

(org-irc-ellipsify-description STRING &optional AFTER)

Documentation

Remove unnecessary white space from STRING and add ellipses if necessary.

Strip starting and ending white space from STRING and replace any chars that the value AFTER with ...

Source Code

;; Defined in /usr/src/emacs/lisp/org/ol-irc.el.gz
(defun org-irc-ellipsify-description (string &optional after)
  "Remove unnecessary white space from STRING and add ellipses if necessary.
Strip starting and ending white space from STRING and replace any
chars that the value AFTER with `...'"
  (let* ((after (number-to-string (or after 30)))
	 (replace-map (list (cons "^[ \t]*" "")
			    (cons "[ \t]*$" "")
			    (cons (concat "^\\(.\\{" after
					  "\\}\\).*") "\\1..."))))
    (dolist (x replace-map string)
      (when (string-match (car x) string)
	(setq string (replace-match (cdr x) nil nil string))))))