Skip to content
Snippets Groups Projects
Commit 90593ea0 authored by ram's avatar ram
Browse files

Changed STRING-xxxCASE to not assign arguments.

parent 6dc759a6
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/string.lisp,v 1.4 1991/04/24 23:37:42 ram Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/string.lisp,v 1.5 1991/05/28 17:25:48 ram Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -30,13 +30,6 @@ ...@@ -30,13 +30,6 @@
string-downcase string-capitalize nstring-upcase nstring-downcase string-downcase string-capitalize nstring-upcase nstring-downcase
nstring-capitalize)) nstring-capitalize))
(eval-when (compile)
;;; %String returns its arg if it is a string, otherwise calls String.
;;;
(defmacro %string (thing)
`(if (stringp ,thing) ,thing (string ,thing)))
)
(defun string (X) (defun string (X)
"Coerces X into a string. If X is a string, X is returned. If X is a "Coerces X into a string. If X is a string, X is returned. If X is a
...@@ -377,8 +370,8 @@ ...@@ -377,8 +370,8 @@
"Given a string, returns a new string that is a copy of it with "Given a string, returns a new string that is a copy of it with
all lower case alphabetic characters converted to uppercase." all lower case alphabetic characters converted to uppercase."
(declare (fixnum start)) (declare (fixnum start))
(if (symbolp string) (setq string (symbol-name string))) (let* ((string (if (stringp string) string (string string)))
(let ((slen (length string))) (slen (length string)))
(declare (fixnum slen)) (declare (fixnum slen))
(with-one-string string start end offset (with-one-string string start end offset
(let ((offset-slen (+ slen offset)) (let ((offset-slen (+ slen offset))
...@@ -406,8 +399,8 @@ ...@@ -406,8 +399,8 @@
"Given a string, returns a new string that is a copy of it with "Given a string, returns a new string that is a copy of it with
all upper case alphabetic characters converted to lowercase." all upper case alphabetic characters converted to lowercase."
(declare (fixnum start)) (declare (fixnum start))
(if (symbolp string) (setq string (symbol-name string))) (let* ((string (if (stringp string) string (string string)))
(let ((slen (length string))) (slen (length string)))
(declare (fixnum slen)) (declare (fixnum slen))
(with-one-string string start end offset (with-one-string string start end offset
(let ((offset-slen (+ slen offset)) (let ((offset-slen (+ slen offset))
...@@ -438,8 +431,8 @@ ...@@ -438,8 +431,8 @@
to be a string of case-modifiable characters delimited by to be a string of case-modifiable characters delimited by
non-case-modifiable chars." non-case-modifiable chars."
(declare (fixnum start)) (declare (fixnum start))
(if (symbolp string) (setq string (symbol-name string))) (let* ((string (if (stringp string) string (string string)))
(let ((slen (length string))) (slen (length string)))
(declare (fixnum slen)) (declare (fixnum slen))
(with-one-string string start end offset (with-one-string string start end offset
(let ((offset-slen (+ slen offset)) (let ((offset-slen (+ slen offset))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment