Next: Replacement, Previous: Conversion, Up: SRFI-207 String-notated bytevectors [Contents][Index]
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)
Returns a newly allocated bytevector with the contents of bytevector, except that consecutive bytes at the beginning / the end / both the beginning and the end that satisfy pred are not included.
(bytestring-trim #u8" Trillian" (lambda (b) (= b #x20)))⇒#u8"Trillian"(bytestring-trim-both #u8(0 0 #x80 #x7f 0 0 0) zero?)⇒#u8(#x80 #x7f)