R/find_longer_word.R

Defines functions find_longer_word

Documented in find_longer_word

#' Find the longer of two characters
#'
#' This function takes two characters and returns the longer of the two
#'
#' @param string1 A character or string
#' @param string2 A character or string
#'
#' @return
#' @export
#'
#' @examples
find_longer_word <- function(string1, string2) {
  if (nchar(string1) > nchar(string2)) {
    print(paste(string1, "is longer than", string2))
  } else {
    print(paste(string2, "is longer than", string1))
  }
}
alexclippinger/pastafish documentation built on Dec. 19, 2021, 12:32 a.m.