original commit: f93afffdc888a77312b57435956c5ec3014f024c
This commit is contained in:
Matthew Flatt 2002-02-13 21:39:24 +00:00
parent 37a0969025
commit f577617b2d
2 changed files with 8 additions and 7 deletions

View File

@ -75,8 +75,7 @@
(cond ((string=? str "") out)
(else
(let ((c (string-ref str 0)))
(cond ((or (char=? c #\space)
(char=? c #\tab))
(cond ((memq c '(#\space #\tab #\newline #\return))
(loop out (substring str 1 (string-length str))))
((char=? c #\");; Begin of quoted string
(let-values ([(quoted rest)
@ -93,13 +92,13 @@
(define trim-left
(lambda (str)
(let* ((r (regexp "^[ ]*(.*)"))
(let* ((r (regexp "^[ \t\r\n]*(.*)"))
(ans (regexp-match r str)))
(and ans (regexp-replace r str "\\1")))))
(cadr ans))))
(define trim-right
(lambda (str)
(let* ((r (regexp "[ ]*$"))
(let* ((r (regexp "[ \t\r\n]*$"))
(pos (regexp-match-positions r str)))
(substring str 0 (caar pos)))))

View File

@ -33,12 +33,14 @@
"qp-sig.ss"
"qp.ss"
"base64-sig.ss"
"base64.ss")
"base64.ss"
"head-sig.ss"
"head.ss")
(define-values/invoke-unit/sig net:mime^
net:mime@
#f
net:base64^ net:qp^)
net:base64^ net:qp^ net:head^)
(provide-signature-elements net:mime^))