Name

null-char-p — Tests a character for NULL value.

Macro

(null-char-p char)

char

A character or integer.

returns

A boolean flag indicating if char is a NULL value.

Description

A predicate testing if a character or integer is NULL. This abstracts the difference in implementations where some return a character and some return a integer whence dereferencing a C character pointer.

Examples

(def-array-pointer ca :unsigned-char)
  (let ((fs (convert-to-foreign-string "ab")))
    (values (null-char-p (deref-array fs 'ca 0))
    (null-char-p (deref-array fs 'ca 2))))
=> NIL
   T

Side Effects

None.

Affected by

None.

Exceptional Situations

None.