Nothing
#' @title Read a fixed-size, NUL-terminated C string from a binary connection.
#'
#' @description Reads a fixed-size string field as used by the Quake file formats (WAL, WAD, PAK, MDL, MD2). Such fields are NUL-padded C strings: the string is followed by zero bytes up to the fixed field size. Reading them with \code{readChar} triggers the "truncating string with embedded nuls" warning, so this helper reads the raw bytes and truncates at the first NUL byte instead (which is also the correct semantics for a C string).
#'
#' @param con a binary connection, opened for reading.
#'
#' @param n integer, the number of bytes to read (the fixed field size in the file).
#'
#' @return character string, the string up to (and excluding) the first NUL byte. An empty string if the field starts with (or entirely consists of) NUL bytes.
#'
#' @noRd
read.c.string <- function(con, n) {
raw = readBin(con, "raw", n = n);
nul_pos = which(raw == as.raw(0));
if(length(nul_pos) > 0L) {
raw = raw[seq_len(nul_pos[1] - 1L)];
}
return(rawToChar(raw));
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.