null-char-p
Prev | Primitive Types | Next

## Name

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

## Syntax

    	null-char-p char => is-null

## Arguments and Values

`char`

  A character or integer.

`is-null`

  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.

Prev | Up | Next
def-foreign-type | Home | Aggregate Types