chickadee » srfi-207 » bytestring-pad-right

bytestring-pad bytevector len char-or-u8procedure
bytestring-pad-right bytevector len char-or-u8procedure

Returns a newly allocated bytevector with the contents of bytevector plus sufficient additional bytes at the beginning/end containing char-or-u8 (which can be either an ASCII character or an exact integer in the range 0–255) such that the length of the result is at least len.

(bytestring-pad #u8"Zaphod" 10 #\_)  #u8"____Zaphod"
(bytestring-pad-right #u8(#x80 #x7f) 8 0)  #u8(#x80 #x7f 0 0 0 0 0 0)