Changeset 9438


Ignore:
Timestamp:
May 9, 2008, 10:24:41 AM (11 years ago)
Author:
gb
Message:

Move MAKE-STRING here, since it needs SUBTYPEP support that only happens
later in the loading sequence. (MAKE-STRING is usually open-coded.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711-perf/ccl/lib/sequences.lisp

    r6555 r9438  
    20902090                                (vector-vector-search sequence1 sequence2))))))
    20912091
     2092(defun make-string (size &key (initial-element () initial-element-p) (element-type 'character element-type-p))
     2093  "Given a character count and an optional fill character, makes and returns
     2094   a new string COUNT long filled with the fill character."
     2095  (when (and initial-element-p (not (typep initial-element 'character)))
     2096    (report-bad-arg initial-element 'character))
     2097  (when (and element-type-p
     2098             (not (or (member element-type '(character base-char standard-char))
     2099                      (subtypep element-type 'character))))
     2100    (error ":element-type ~S is not a subtype of CHARACTER" element-type))
     2101  (if initial-element-p
     2102      (make-string size :element-type 'base-char :initial-element initial-element)
     2103      (make-string size :element-type 'base-char)))
Note: See TracChangeset for help on using the changeset viewer.