Function: gnus-simplify-whitespace
gnus-simplify-whitespace is a byte-compiled function defined in
gnus-sum.el.gz.
Signature
(gnus-simplify-whitespace STR)
Documentation
Remove excessive whitespace from STR.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
;; Subject simplification.
(defun gnus-simplify-whitespace (str)
"Remove excessive whitespace from STR."
;; Multiple spaces.
(while (string-match "[ \t][ \t]+" str)
(setq str (concat (substring str 0 (match-beginning 0))
" "
(substring str (match-end 0)))))
;; Leading spaces.
(when (string-match "^[ \t]+" str)
(setq str (substring str (match-end 0))))
;; Trailing spaces.
(when (string-match "[ \t]+$" str)
(setq str (substring str 0 (match-beginning 0))))
str)