Next: pointerp, Previous: null-pointer, Up: Pointers [Contents][Index]
A foreign pointer that may be a null pointer.
T
or NIL
.
The function null-pointer-p
returns true if ptr is a null
pointer and false otherwise.
CFFI> (null-pointer-p (null-pointer))
⇒ T
(defun contains-str-p (big little) (not (null-pointer-p (foreign-funcall "strstr" :string big :string little :pointer)))) CFFI> (contains-str-p "Popcorns" "corn") ⇒ T CFFI> (contains-str-p "Popcorns" "salt") ⇒ NIL