R/utils-pipe.R

Defines functions html_decoder

Documented in html_decoder

#' Pipe operator
#'
#' See \code{magrittr::\link[magrittr:pipe]{\%>\%}} for details.
#'
#' @name %>%
#' @rdname pipe
#' @keywords internal
#' @export
#' @importFrom magrittr %>%
#' @usage lhs \%>\% rhs
NULL

#'  html decoder fo single string object
#'
#' @param str a string to be decoded
#'
#' @return decoded string
#' @export
#'
#' @examples html_decoder("& >")
html_decoder <- function(str) {
  html <- paste0("<x>", str, "</x>")
  parsed <- xml2::xml_text(xml2::read_html(html))
}
CDU-data-science-team/experiencesdashboard documentation built on Nov. 30, 2023, 5:57 a.m.