Function: srecode-document-trim-whitespace

srecode-document-trim-whitespace is a byte-compiled function defined in document.el.gz.

Signature

(srecode-document-trim-whitespace STR)

Documentation

Strip stray whitespace from around STR.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/srecode/document.el.gz
(defun srecode-document-trim-whitespace (str)
  "Strip stray whitespace from around STR."
  (when (string-match "^\\(\\s-\\|\n\\)+" str)
    (setq str (replace-match "" t t str)))
  (when (string-match "\\(\\s-\\|\n\\)+$" str)
    (setq str (replace-match "" t t str)))
  str)