/[cmucl]/src/code/string.lisp
ViewVC logotype

Diff of /src/code/string.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12.30.13 by rtoy, Wed May 6 13:05:15 2009 UTC revision 1.12.30.14 by rtoy, Tue May 12 16:31:49 2009 UTC
# Line 73  Line 73 
73    
74  (defun string (X)  (defun string (X)
75    "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
76     symbol, X's pname is returned.  If X is a character then a one element    symbol, X's pname is returned.  If X is a character then a one element
77     string containing that character is returned.  If X cannot be coerced    string containing that character is returned.  If X cannot be coerced
78     into a string, an error occurs."    into a string, an error occurs."
79    (cond ((stringp x) x)    (cond ((stringp x) x)
80          ((symbolp x) (symbol-name x))          ((symbolp x) (symbol-name x))
81          ((characterp x)          ((characterp x)
# Line 150  Line 150 
150    
151  (defun schar (string index)  (defun schar (string index)
152    "SCHAR returns the character object at an indexed position in a string    "SCHAR returns the character object at an indexed position in a string
153     just as CHAR does, except the string must be a simple-string."    just as CHAR does, except the string must be a simple-string."
154    (declare (optimize (safety 1)))    (declare (optimize (safety 1)))
155    (schar string index))    (schar string index))
156    
# Line 430  Line 430 
430    
431  (defun make-string (count &key element-type ((:initial-element fill-char)))  (defun make-string (count &key element-type ((:initial-element fill-char)))
432    "Given a character count and an optional fill character, makes and returns    "Given a character count and an optional fill character, makes and returns
433     a new string Count long filled with the fill character."    a new string Count long filled with the fill character."
434    (declare (type fixnum count))    (declare (type fixnum count))
435    (assert (subtypep element-type 'character))    (assert (subtypep element-type 'character))
436    (if fill-char    (if fill-char

Legend:
Removed from v.1.12.30.13  
changed lines
  Added in v.1.12.30.14

  ViewVC Help
Powered by ViewVC 1.1.5