R/valid_nickname.R

Defines functions valid_nickname

valid_nickname <- function(char){
  valid = TRUE
  cond <- c(nchar(char) <= 20,
               nchar(char) >=2,
               grepl("^[a-zA-Z0-9]*$", char))
  if(!all(cond)){
    valid = FALSE
  }
  return(valid)
}
DivadNojnarg/deminR documentation built on March 21, 2020, 5:39 p.m.