Function: shell-extract-num

shell-extract-num is a byte-compiled function defined in shell.el.gz.

Signature

(shell-extract-num STR)

Source Code

;; Defined in /usr/src/emacs/lisp/shell.el.gz
;; If STR is of the form +n, for n>0, return n. Otherwise, nil.
(defun shell-extract-num (str)
  (and (string-match "^\\+[1-9][0-9]*$" str)
       (string-to-number str)))