Next: , Previous: , Up: bytevectors 8   [Index]


27.2.5 Predicates

Function: bytevector-u8-null? obj

Return #t if obj is the empty bytevector, otherwise return #f.

Function: %bytevector-s8-every byte/char/char-set/pred bv start past
Function: %bytevector-u8-every byte/char/char-set/pred bv start past
Function: %bytevector-s8-any byte/char/char-set/pred bv start past
Function: %bytevector-u8-any byte/char/char-set/pred bv start past
Macro: bytevector-s8-every byte/char/char-set/pred B
Macro: bytevector-u8-every byte/char/char-set/pred B
Macro: bytevector-s8-any byte/char/char-set/pred B
Macro: bytevector-u8-any byte/char/char-set/pred B

Check to see if the given criteria is true on every/any byte in bv, proceeding from left (index start) to right (index past).

If the selected subvector is empty: the return value is #f.

If byte/char/char-set/pred is a byte, it is tested for equality with the elements of B.

If byte/char/char-set/pred is a character, it is tested for equality with the elements of B.

If byte/char/char-set/pred is a character set, the elements of B are tested for membership in the set.

If byte/char/char-set/pred is a predicate procedure, it is applied to the elements of B. The predicate is “witness–generating”:

If the predicate is applied to the final element of the selected subvector, that final application is a tail call.

The names of these procedures do not end with a question mark; this is to indicate that, in the predicate case, they do not return a simple boolean (#t or #f), but a general value.


Next: , Previous: , Up: bytevectors 8   [Index]