From bdaa70eddaa93bbc908d0d13496d253b1cdfe320 Mon Sep 17 00:00:00 2001 From: Stephen Adams Date: Tue, 7 Nov 1995 04:39:57 +0000 Subject: [PATCH] Added STRING->CHAR-SET. --- v7/src/runtime/chrset.scm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/v7/src/runtime/chrset.scm b/v7/src/runtime/chrset.scm index ea3393eea..ccd5f23ad 100644 --- a/v7/src/runtime/chrset.scm +++ b/v7/src/runtime/chrset.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/chrset.scm,v 14.3 1988/07/15 22:30:00 cph Rel $ +$Id: chrset.scm,v 14.4 1995/11/07 04:39:57 adams Exp $ -Copyright (c) 1988 Massachusetts Institute of Technology +Copyright (c) 1988-1995 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -54,6 +54,14 @@ MIT in each case. |# chars) char-set)) +(define (string->char-set string) + (let ((char-set (string-allocate 256))) + (vector-8b-fill! char-set 0 256 0) + (do ((i (- (string-length string) 1) (- i 1))) + ((< i 0)) + (vector-8b-set! char-set (vector-8b-ref string i) 1)) + char-set)) + (define (ascii-range->char-set lower upper) (let ((char-set (string-allocate 256))) (vector-8b-fill! char-set 0 lower 0) -- 2.25.1