14 lines
628 B
Plaintext
14 lines
628 B
Plaintext
(setf emptystring "") ;binds variable'emptystring' to the empty string ""
|
|
|
|
(let ((emptystring "")) ;; Binds local variable 'emptystring' to the empty string ""
|
|
(when (string-equal emptystring "") ;;case insensitive string comparison
|
|
(print "Is an empty string")) ;;bad argument error if not a string
|
|
(when (stringp emptystring)
|
|
(print "Is a string"))
|
|
(when (not (stringp emptystring))
|
|
(print "Is not a string"))
|
|
(when (and (stringp emptystring)(= (length emptystring) 0))
|
|
(print "Is an empty string"))
|
|
(when (and (stringp emptystring)(> (length emptystring) 0))
|
|
(print "Is a non-empty string")))
|