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


27.2.15 List and string conversion

Function: %bytevector->s8-list* bv start past
Function: %bytevector->u8-list* bv start past
Macro: bytevector->s8-list* B
Macro: bytevector->u8-list* B

Return a newly allocated list of the bytes that make up the given subvector.

Function: %reverse-bytevector->s8-list bv start past
Function: %reverse-bytevector->u8-list bv start past
Macro: reverse-bytevector->s8-list B
Macro: reverse-bytevector->u8-list B

Like %bytevector->u8-list* but reverses the order of the bytes from the subvector.

Function: reverse-s8-list->bytevector-u8 char-list
Function: reverse-u8-list->bytevector-u8 char-list

Reverse the given list of characters, then compose a bytevector with the result.

Function: %bytevector-s8-tokenize token-set bv start past
Function: %bytevector-u8-tokenize token-set bv start past
Function: %bytevector-s8-tokenise token-set bv start past
Function: %bytevector-u8-tokenise token-set bv start past
Macro: bytevector-s8-tokenize B token-set
Macro: bytevector-u8-tokenize B token-set
Macro: bytevector-s8-tokenise B token-set
Macro: bytevector-u8-tokenise B token-set

Split the selected subvector into a list of bytevectors, where each bytevector is a maximal, non–empty, contiguous sequence of bytes whose character interpretation in ASCII encoding is in the character set token-set.

Function: bytevector-s8-join bytevector-u8-list
Function: bytevector-u8-join bytevector-u8-list
Function: bytevector-s8-join bytevector-u8-list delimiter
Function: bytevector-u8-join bytevector-u8-list delimiter
Function: bytevector-s8-join bytevector-u8-list delimiter grammar
Function: bytevector-u8-join bytevector-u8-list delimiter grammar
Function: %bytevector-s8-join bytevector-u8-list delimiter grammar
Function: %bytevector-u8-join bytevector-u8-list delimiter grammar

This procedure is a simple unparser: it pastes strings together using the delimiter bytevector. delimiter defaults to a single byte representing a white space in ASCII encoding. grammar is a symbol that determines how the delimiter is used, and defaults to infix. Supported values for grammar are:

infix

Means an infix or separator grammar: insert the delimiter between list elements. An empty list will produce an empty string.

Note: Parsing an empty string with an infix grammar is ambiguous. Is it an empty list, or a list of one element, the empty string?

strict-infix

Means the same as infix, but will raise an error if given an empty list.

suffix

Means a suffix or terminator grammar: insert the delimiter after every list element. This grammar has no ambiguities.

prefix

Means a prefix grammar: insert the delimiter before every list element. This grammar has no ambiguities.


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