Function: python-util-strip-string

python-util-strip-string is a byte-compiled function defined in python.el.gz.

Signature

(python-util-strip-string STRING)

Documentation

Strip STRING whitespace and newlines from end and beginning.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-util-strip-string (string)
  "Strip STRING whitespace and newlines from end and beginning."
  (replace-regexp-in-string
   (rx (or (: string-start (* (any whitespace ?\r ?\n)))
           (: (* (any whitespace ?\r ?\n)) string-end)))
   ""
   string))