Useful for handling raw reply vectors.

strip.raw(x, pre = c(charToRaw("X\n"), as.raw(0L)))

Arguments

x

Raw vector to strip

pre

Prefix to strip off if present, a raw vector

Value

Stripped raw vector

Examples

strip.raw(c(charToRaw("X\n"), as.raw(0), charToRaw("abc")))
#> [1] 61 62 63