NextPrevUpTopContentsIndex

23.4.1 Default string construction

If the value is base-char then:

(make-string 3)

returns a simple-base-string . If the value is simple-char then the same form returns a simple-text-string .

If the value of *default-character-element-type* is base-char , then

(coerce sequence 'simple-string)

attempts to construct a simple-base-string . This will signal an error if any element of sequence is not a base-char .

If the value of *default-character-element-type* is simple-char , then

(coerce sequence 'simple-string)

attempts to construct a simple-text-string . This will signal an error if any element of sequence is not a simple-char .

Other string constructors also take their default from *default-character-element-type* . For instance, the string reader will always construct a string of type determined by this variable, unless it sees a character of a larger type, in which case a suitable string is constructed. Also with-output-to-string and make-string-output-stream will construct a stream with element type determined by this variable and generate a string of the same element type.


LispWorks User Guide - 11 Mar 2008

NextPrevUpTopContentsIndex