loading...

re: Daily Challenge #1 - String Peeler VIEW POST

FULL DISCUSSION
 

R

peel <-function(inputString) {
  ifelse(nchar(inputString) <=2, NA,
 substr(inputString,2,nchar(inputString)-1))
}

Natively works on matrices/vectors of strings, which is cool.

code of conduct - report abuse