RosettaCodeData/Task/Reverse-a-string/R/reverse-a-string-2.r

2 lines
70 B
R
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
revstring <- function(s) paste(rev(strsplit(s,"")[[1]]),collapse="")