R/str_printable.R

#' str_printable
#'
#' @examples
#' x <- as.raw(c(0x28, 0x12, 0x41))
#' print(rawToChar(x))
#' str_printable(rawToChar(x))
#'
#' @importFrom stringr str_remove_all
#' @export
str_printable <- function (x, non_printable = "[^[:print:]]") {
  str_remove_all(x, non_printable)
}
BAAQMD/strtools documentation built on May 3, 2024, 10:56 a.m.