nil
(the default), or an integer greater than or equal to 0.
(1- array-total-size-limit)
, by default.
*default-foreign-encoding*
.
The foreign-string-to-lisp
function converts at most
count octets from ptr into a Lisp string, using the
defined encoding.
If count is nil
(the default), characters are copied
until max-chars is reached or a NULL
character is found.
If ptr is a null pointer, returns nil
.
Note that the :string
type will automatically convert between
Lisp strings and foreign strings.
CFFI> (foreign-funcall "getenv" :string "HOME" :pointer) => #<FOREIGN-ADDRESS #xBFFFFFD5> CFFI> (foreign-string-to-lisp *) => "/Users/luis"