Next: with-foreign-string, Previous: foreign-string-to-lisp, Up: Strings [Contents][Index]
A Lisp string.
A foreign pointer.
An integer.
Bounding index designators of string. 0 and nil
, by
default.
An integer greater than or equal to 0. Defauls to 0.
Foreign encoding. Defaults to *default-foreign-encoding*
.
The lisp-string-to-foreign
function copies at most
bufsize-1 octets from a Lisp string using the specified
encoding into buffer+offset. The foreign string will
be null-terminated.
Start specifies an offset into string and end marks the position following the last element of the foreign string.
CFFI> (with-foreign-pointer-as-string (str 255)
(lisp-string-to-foreign "Hello, foreign world!" str 6))
⇒ "Hello"
foreign-string-alloc
foreign-string-to-lisp
with-foreign-pointer-as-string