readCharSafe function

readCharSafe

readCharSafe

reads n bytes as raw from a binary connection. Removes any embedded nuls, replacing them with replace.

readCharSafe(con, n, replace = " ")

Arguments

  • con: A file connection - usually a binary file.
  • n: The number of bytes to read.
  • replace: a character to replace embedded nulls with.

Returns

character vector.

  • Maintainer: Dan Cloney
  • License: GPL-3
  • Last published: 2025-02-19