From b70a5ad5ba82a0390192fbf40240b86e35183a30 Mon Sep 17 00:00:00 2001 From: morioka Date: Sat, 14 Sep 1996 08:41:00 +0000 Subject: [PATCH] (std11-strip-quoted-pair): New function; moved from tl-822.el. (std11-strip-quoted-string): New function; moved from tl-822.el. --- std11.el | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/std11.el b/std11.el index da5825a..bc7e870 100644 --- a/std11.el +++ b/std11.el @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko ;; Keywords: mail, news, RFC 822, STD 11 -;; Version: $Id: std11.el,v 0.31 1996-09-08 19:35:20 morioka Exp $ +;; Version: $Id: std11.el,v 0.32 1996-09-14 08:41:00 morioka Exp $ ;; This file is part of MU (Message Utilities). @@ -211,6 +211,35 @@ If BOUNDARY is not nil, it is used as message header separator. )) string "") "\"")) +(defun std11-strip-quoted-pair (str) + (let ((dest "") + (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) + ) + (setq i (+ i 1)) + ) + dest)) + +(defun std11-strip-quoted-string (string) + "Strip quoted-string STRING. [std11.el]" + (std11-strip-quoted-pair + (let ((max (1- (length string)))) + (if (and (eq (aref string 0) ?\") + (eq (aref string max) ?\") + ) + (substring str 1 max) + string) + ))) + ;;; @ composer ;;; -- 1.7.10.4