Next: , Previous: String Syntax, Up: Strings


21.4.2 String Predicates

The following procedures can be used to check whether a given string fulfills some specified property.

— Scheme Procedure: string? obj
— C Function: scm_string_p (obj)

Return #t iff obj is a string, else #f.

— Scheme Procedure: string-null? str
— C Function: scm_string_null_p (str)

Return #t if str's length is zero, and #f otherwise.

          (string-null? "")
          ⇒ #t
          
          (string-null? "wow")
          ⇒ #f