Changeset 9927


Ignore:
Timestamp:
Jul 7, 2008, 8:47:09 PM (11 years ago)
Author:
gz
Message:

Move make-string (r9438)

Location:
trunk/source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/l0-array.lisp

    r9060 r9927  
    1717(in-package "CCL")
    1818
    19 (defun make-string (size &key (initial-element () initial-element-p) (element-type 'character element-type-p))
    20   "Given a character count and an optional fill character, makes and returns
    21    a new string COUNT long filled with the fill character."
    22   (when (and initial-element-p (not (typep initial-element 'character)))
    23     (report-bad-arg initial-element 'character))
    24   (when (and element-type-p
    25              (not (or (member element-type '(character base-char standard-char))
    26                       (subtypep element-type 'character))))
    27     (error ":element-type ~S is not a subtype of CHARACTER" element-type))
    28   (if initial-element-p
    29       (make-string size :element-type 'base-char :initial-element initial-element)
    30       (make-string size :element-type 'base-char)))
     19
    3120
    3221
  • trunk/source/lib/sequences.lisp

    r9879 r9927  
    20602060                                (vector-vector-search sequence1 sequence2))))))
    20612061
     2062(defun make-string (size &key (initial-element () initial-element-p) (element-type 'character element-type-p))
     2063  "Given a character count and an optional fill character, makes and returns
     2064   a new string COUNT long filled with the fill character."
     2065  (when (and initial-element-p (not (typep initial-element 'character)))
     2066    (report-bad-arg initial-element 'character))
     2067  (when (and element-type-p
     2068             (not (or (member element-type '(character base-char standard-char))
     2069                      (subtypep element-type 'character))))
     2070    (error ":element-type ~S is not a subtype of CHARACTER" element-type))
     2071  (if initial-element-p
     2072      (make-string size :element-type 'base-char :initial-element initial-element)
     2073      (make-string size :element-type 'base-char)))
Note: See TracChangeset for help on using the changeset viewer.