#| -*-Scheme-*-
-$Id: runtime.pkg,v 14.652 2008/07/26 05:45:35 cph Exp $
+$Id: runtime.pkg,v 14.653 2008/07/26 22:51:15 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
pathname-type->mime-type
rename-file
soft-link-file
- string->mime-type)
+ string->mime-type
+ string-is-mime-token?
+ string-is-mime-type?)
(initialization (initialize-package!)))
(define-package (runtime symbol)
#| -*-Scheme-*-
-$Id: sfile.scm,v 14.43 2008/01/30 20:02:35 cph Exp $
+$Id: sfile.scm,v 14.44 2008/07/26 22:51:29 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
(and (string? object)
(string-is-mime-type? object)))
-(define (string-is-mime-type? string)
- (let ((end (string-length string)))
- (let ((i (check-mime-token-syntax string 0 end)))
+(define (string-is-mime-type? string #!optional start end)
+ (let ((start (if (default-object? start) 0 start))
+ (end (if (default-object? end) (string-length string) end)))
+ (let ((i (check-mime-token-syntax string start end)))
(and (fix:> i 0)
(fix:< i end)
(char=? (string-ref string i) #\/)
(and (string? object)
(string-is-mime-token? object)))
-(define (string-is-mime-token? string)
- (let ((end (string-length string)))
- (fix:= end (check-mime-token-syntax string 0 end))))
+(define (string-is-mime-token? string #!optional start end)
+ (let ((start (if (default-object? start) 0 start))
+ (end (if (default-object? end) (string-length string) end)))
+ (fix:= end (check-mime-token-syntax string start end))))
(define (check-mime-token-syntax string start end)
(let loop ((i start))