LispWorks User Guide and Reference Manual > 22 Internationalization > 22.4 String Construction

NextPrevUpTopContentsIndex

22.4.1 Default string construction

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

(make-string 3)

returns a simple-base-string and

(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

(make-string 3)

returns a simple-text-string and

(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 and Reference Manual - 22 Dec 2009

NextPrevUpTopContentsIndex