R/external.R

Defines functions find_whitespace_2 find_whitespace

Documented in find_whitespace find_whitespace_2

#' find_whitespace w/ double-colon approach
#'
#' Is there whitespace in the string?
#'
#' @param str string
#'
#' @return boolean
#' @export
find_whitespace <- function(str) {
    stringr::str_detect(str, "\\s")          # in console: use_package("stringr")
}

#' find_whitespace w/ @@importFrom approach
#'
#' Is there whitespace in the string?
#'
#' @param str string
#'
#' @return boolean
#' @export
#' @importFrom stringr str_detect
find_whitespace_2 <- function(str) {
    str_detect(str, "\\s")
}
omkarakatta/firstpackage documentation built on Sept. 8, 2020, 12:09 a.m.