The following procedures can be used to check whether a given string fulfills some specified property.
Return #t
if obj is a string, else #f
.
int
scm_is_string (SCM obj)
¶Returns 1
if obj is a string, 0
otherwise.
Return #t
if str’s length is zero, and
#f
otherwise.
(string-null? "") ⇒ #t y ⇒ "foo" (string-null? y) ⇒ #f
Check if char_pred is true for any character in string s.
char_pred can be a character to check for any equal to that, or a character set (see Character Sets) to check for any in that set, or a predicate procedure to call.
For a procedure, calls (char_pred c)
are made
successively on the characters from start to end. If
char_pred returns true (ie. non-#f
), string-any
stops and that return value is the return from string-any
. The
call on the last character (ie. at end-1), if that
point is reached, is a tail call.
If there are no characters in s (ie. start equals
end) then the return is #f
.
Check if char_pred is true for every character in string s.
char_pred can be a character to check for every character equal to that, or a character set (see Character Sets) to check for every character being in that set, or a predicate procedure to call.
For a procedure, calls (char_pred c)
are made
successively on the characters from start to end. If
char_pred returns #f
, string-every
stops and
returns #f
. The call on the last character (ie. at
end-1), if that point is reached, is a tail call and the
return from that call is the return from string-every
.
If there are no characters in s (ie. start equals
end) then the return is #t
.