R/strings.r

Defines functions strip_U

Documented in strip_U

#' Strip unicode characters
#' 
#' the stripped one can be used in, for example, selecting columns.
#' 
#' @param x string with unicode such as "<U+2019>"
#' @export 
strip_U <- function(x) gsub("<U\\+(....)>", "\\\\u\\1", x) %>%  stringi::stri_unescape_unicode()
kklot/ktools documentation built on Aug. 13, 2024, 7:08 p.m.