Strips if and only if raw.

strip_if_raw(x, ...)

Arguments

x

Raw vector to strip else anything else

...

Arguments passed on to strip.raw

pre

Prefix to strip off if present, a raw vector

Value

Stripped raw vector else unchanged

Examples

strip_if_raw(c(charToRaw("X\n"), as.raw(0L)))
#> raw(0)
#> raw(0)