Sha256: a6a17c98948d5dbed25b67821cc606cc403c8f8dd034a7d96f15025076bcd380
Contents?: true
Size: 414 Bytes
Versions: 153
Compression:
Stored size: 414 Bytes
Contents
bob <- function(input) { # function bob takes a character input and responds # with a couple different sentences # strip white space input <- gsub("[[:space:]]", "", input) if (input == "") { return("Fine. Be that way!") } if (toupper(input) == input && tolower(input) != input) { return("Whoa, chill out!") } if (endsWith(input, "?")) { return("Sure.") } return("Whatever.") }
Version data entries
153 entries across 153 versions & 1 rubygems