;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;; Keywords: mail, news, RFC 822, STD 11
-;; Version: $Id: std11.el,v 0.36 1996-12-02 15:20:12 shuhei-k Exp $
+;; Version: $Id: std11.el,v 0.37 1996-12-16 07:12:38 morioka Exp $
;; This file is part of MU (Message Utilities).
)) string "")
"\""))
-(defun std11-strip-quoted-pair (str)
- (let ((dest "")
+(defun std11-strip-quoted-pair (string)
+ "Strip quoted-pairs in STRING. [std11.el]"
+ (let (dest
+ (b 0)
(i 0)
- (len (length str))
- chr flag)
- (while (< i len)
- (setq chr (aref str i))
- (if (or flag (not (eq chr ?\\)))
- (progn
- (setq dest (concat dest (char-to-string chr)))
- (setq flag nil)
- )
- (setq flag t)
+ (len (length string))
)
- (setq i (+ i 1))
- )
- dest))
+ (while (< i len)
+ (let ((chr (aref string i)))
+ (if (eq chr ?\\)
+ (setq dest (concat dest (substring string b i))
+ b (1+ i)
+ i (+ i 2))
+ (setq i (1+ i))
+ )))
+ (concat dest (substring string b))
+ ))
(defun std11-strip-quoted-string (string)
"Strip quoted-string STRING. [std11.el]"