From: Chris Hanson Date: Wed, 24 Sep 2003 19:21:58 +0000 (+0000) Subject: New procedures STRING-HEAD->SYMBOL and STRING-TAIL->SYMBOL. X-Git-Tag: 20090517-FFI~1794 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=e0652237c2d1e245ed65ad468f88064efe68f3d6;p=mit-scheme.git New procedures STRING-HEAD->SYMBOL and STRING-TAIL->SYMBOL. --- diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 1c6107489..0fca3f7b1 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.458 2003/09/24 03:38:57 cph Exp $ +$Id: runtime.pkg,v 14.459 2003/09/24 19:21:55 cph Exp $ Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology @@ -460,6 +460,8 @@ USA. interned-symbol? string->symbol string->uninterned-symbol + string-head->symbol + string-tail->symbol substring->symbol symbol->string symbol-append diff --git a/v7/src/runtime/symbol.scm b/v7/src/runtime/symbol.scm index b0aa3e8d9..b4cbf6e57 100644 --- a/v7/src/runtime/symbol.scm +++ b/v7/src/runtime/symbol.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: symbol.scm,v 1.12 2003/09/24 03:38:46 cph Exp $ +$Id: symbol.scm,v 1.13 2003/09/24 19:21:58 cph Exp $ Copyright 1992,1993,2001,2003 Massachusetts Institute of Technology @@ -66,6 +66,12 @@ USA. (define (substring->symbol string start end) ((ucode-primitive string->symbol) (substring string start end))) +(define (string-head->symbol string end) + ((ucode-primitive string->symbol) (string-head string end))) + +(define (string-tail->symbol string start) + ((ucode-primitive string->symbol) (string-tail string start))) + (define (intern string) (if (string-lower-case? string) (string->symbol string)