public
Description: Arc Lisp to C compiler
Home | Edit | New

Strings

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
Last edited by sacado, Fri Apr 18 15:14:38 -0700 2008
Home | Edit | New
Versions: