Function: yenc-parse-line

yenc-parse-line is a byte-compiled function defined in yenc.el.gz.

Signature

(yenc-parse-line STR)

Documentation

Extract file name and size from STR.

Source Code

;; Defined in /usr/src/emacs/lisp/mail/yenc.el.gz
(defun yenc-parse-line (str)
  "Extract file name and size from STR."
  (let (result name)
    (when (string-match "^=y.*size=\\([0-9]+\\)" str)
      (push (cons 'size (string-to-number (match-string 1 str))) result))
    (when (string-match "^=y.*name=\\(.*\\)$" str)
      (setq name (match-string 1 str))
      ;; Remove trailing white space
      (when (string-match " +$" name)
	(setq name (substring name 0 (match-beginning 0))))
      (push (cons 'name name) result))
    result))