packrat/src/rstudioapi/rstudioapi/R/misc.R

#' @importFrom utils capture.output
formatText <- function(text, n = 20L, truncated = "<...>") {

  result <- if (nchar(text) < n)
    text
  else
    paste(text, truncated)

  encodeString(result)
}
eldinidle/ActiPro documentation built on July 1, 2020, 2:41 p.m.