R/wrap.writeClipboard.R

Defines functions wrap.writeClipboard

Documented in wrap.writeClipboard

#' Write to clipboard
#'
#' @description Writes a string to the clipboard and removes the trailing newline. The
#' function delegates the primary operations to writeClipboard (package: utils). (This
#' is a helper function that will be called by other functions in this package.)
#'
#' @param string The string to write to the clipboard
#'
#' @seealso writeClipboard (package: utils)
#'
#' @examples
#' wrap.writeClipboard(string = "text")
#'
#' @importFrom utils writeClipboard
#' @export
wrap.writeClipboard <- function(string) {
  writeClipboard(charToRaw(paste0(string, ' ')))
  }
michaelkardas/behavioralwrappers documentation built on Jan. 2, 2020, 7:46 a.m.