Converts a Lisp string to a foreign string, binds variables to a pointer to the foreign string, the number of elements in the string, and the number of bytes taken up by the string, then executes a list of forms, and finally de-allocates the foreign string and pointer.
A symbol bound to a pointer to the foreign string.
A symbol bound to the number of elements in the foreign string.
A symbol bound to the number of bytes occupied by the foreign string. If the element size of the string is equal to one byte, then byte-count will be the same as element-count .
An external format specification.
, the foreign string is terminated by a null character. The null character is included in the
of the string.
A boolean. The default is
The Lisp string to convert.
A list of forms to be executed.
A form to be executed.
is used to dynamically convert a Lisp string to a foreign string and execute a list of forms using the foreign string. The macro first converts
, a Lisp string, into a foreign string. The symbol
is bound to a pointer to the start of the string, the symbol
is set equal to the number of elements in the string, and the symbol
is set equal to the number of bytes the string occupies. Then the list of forms specified by
is executed. Finally, the memory allocated for the foreign string and pointer is de-allocated.
argument is used to specify the encoding of the foreign string. It defaults to a format appropriate for C string of type
. For Unicode encoded strings, specify
. If you want to pass a string to the Win32 API, known as
in the Win32 API terminology, specify
, which is a variable holding the external format corresponding to the current Windows multi-byte code page. To change the default, call set-locale or set-locale-encodings.
keyword specifies whether the foreign string is terminated with a null character. It defaults to
. If the string terminates in a null character, it is included in the