DEV Community

loading...

Discussion on: Daily Challenge #1 - String Peeler

Collapse
mdarrik profile image
Darrik Moberg

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.

Forem Open with the Forem app