-
Notifications
You must be signed in to change notification settings - Fork 2
Strings
sacado edited this page Sep 12, 2010
·
1 revision
Strings are implemented as an array of characters preceded by its length. Each character is a codepoint, implemented as a long. This is very space-consuming (8 bytes per character on a 64 bits machine) but should be corrected later. Furthermore, it provide O(1) access to individual characters and modification and constant access to length. When printed, strings are transformed to UTF-8.
Functions implemented for strings are pr, prn, sref, +, is, isnt. The is function works the way it is supposed to : it compares the content of the string, not object identity. Thus :
(is “foo” (+ “f” “oo”)) ==> t