XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

stringp


Type:   -   predicate function (subr)
Source:   -   xlbfun.c

Syntax

(stringp expr)
expr - the expression to check
returns -  T  if the value is a string, NIL otherwise

Description

The 'stringp' predicate function checks if 'expr' is a string.  T  is returned if 'expr' is a string, NIL is returned otherwise.

Examples

(stringp "a")        ; returns T - string

(setq a "hi there"
(stringp a)          ; returns T - evaluates to string

(stringp #\a)        ; returns NIL - character
(stringp '(a b c))   ; returns NIL - list
(stringp 1)          ; returns NIL - integer
(stringp 1.2)        ; returns NIL - float
(stringp 'a)         ; returns NIL - symbol
(stringp #(0 1 2))   ; returns NIL - array
(stringp nil)        ; returns NIL - nil

See the stringp predicate function in the XLISP 2.0 manual.

  Back to Top


XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next