(guile.info.gz) SRFI-13 Predicates
Info Catalog
(guile.info.gz) Loading SRFI-13
(guile.info.gz) SRFI-13
(guile.info.gz) SRFI-13 Constructors
39.11.2 Predicates
------------------
In addition to the primitives `string?' and `string-null?', which are
already in the Guile core, the string predicates `string-any' and
`string-every' are defined by SRFI-13.
-- Scheme Procedure: string-any char_pred s [start end]
Return true if `char_pred' is satisfied for any character in the
string S. CHAR_PRED can be
* A character, to to test for any in S equal to that.
* A character set ( SRFI-14), to test for any character
in S in that character set.
* A predicate function, called as `(CHAR_PRED c)' for each
character in S, from left to right, to test for any on which
CHAR_PRED returns true.
When CHAR_PRED does return true (ie. non-`#f'), that value is
the value returned by `string-any'.
If there are no characters in S (ie. START equals END) then the
return is `#f'.
SRFI-13 specifies that when CHAR_PRED is a predicate function, the
call on the last character of S (assuming that point is reached)
is a tail call, but currently in Guile this is not the case.
-- Scheme Procedure: string-every char_pred s [start end]
Return true if CHAR_PRED is satisifed for every character in the
string S. CHAR_PRED can be
* A character, to to test for every character in S equal to
that.
* A character set ( SRFI-14), to test for every
character in S being in that character set.
* A predicate function, called as `(CHAR_PRED c)' for each
character in S, from left to right, to test that it returns
true for every character in S.
When CHAR_PRED does return true (ie. non-`#f') for every
character, the return from the last call is the value
returned by `string-every'.
If there are no characters in S (ie. START equals END) then the
return is `#t'.
SRFI-13 specifies that when CHAR_PRED is a predicate function, the
call on the last character of S (assuming that point is reached)
is a tail call, but currently in Guile this is not the case.
Info Catalog
(guile.info.gz) Loading SRFI-13
(guile.info.gz) SRFI-13
(guile.info.gz) SRFI-13 Constructors
automatically generated byinfo2html