R/rowid-title.R

Defines functions format.pillar_rif_title rif_title

rif_title <- function(has_title, ...) {
  ret <- structure(
    list(
      has_title = has_title
    ),
    class = "pillar_rif_title"
  )

  ret <- set_width(ret, 0L)
  ret
}

#' @export
format.pillar_rif_title <- function(x, width, ...) {
  if (!x$has_title) {
    character()
  } else {
    ""
  }
}

Try the pillar package in your browser

Any scripts or data that you put into this service are public.

pillar documentation built on March 31, 2023, 10:19 p.m.