All Manuals > LispWorks® User Guide and Reference Manual > 38 The LISPWORKS Package

text-string

simple-text-string Types

Summary

The text string types.

Package

lispworks

Signatures

text-string &optional length

simple-text-string &optional length

Arguments
length
The length of the string (or *, meaning any, which is the default).
Description

Instances of the type text-string are strings that can hold any character, that is, (vector cl:character length). This is the string type that is guaranteed to always hold any character used in writing text (program text or natural language).

simple-text-string is the simple version of text-string, that is, the string itself is simple. Equivalent to:

(simple-vector cl:character length)

If length is not *, then it constrains the length of the string to that number of elements.

Notes

text-string uses 32 bits per character. Applications that use many strings and are very large, when they know they do not use the full Unicode range, can consider using base-string (up to 8 bits) or bmp-string (up to 16 bits) to reduce memory usage.

Compatibility note

In LispWorks 6.1 and earlier versions, text-string uses 16 bits per character.

See also

bmp-string
base-string
text-string-p
26.3 Character and String types


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:41