Previous: with-foreign-string, Up: Strings
The with-foreign-pointer-as-string
macro is similar to
with-foreign-pointer
except that var, as a Lisp string, is
used as the returned value of an implicit progn
around body.
CFFI> (with-foreign-pointer-as-string (str 6 str-size)
(lisp-string-to-foreign "Hello, foreign world!" str str-size))
=> "Hello"