chickadee » srfi-207 » bytestring-chomp

bytestring-chomp bytevector #!optional suffixprocedure

Returns a newly allocated bytevector with the contents of bytevector, except that the bytevector suffix is trimmed from the end if it is present. suffix defaults to #u8"\n".

(Extension based on string-chomp from (chicken string).)

(bytestring-chomp #u8"Vogon, " #u8", ") ⇒ #u8"Vogon"