RosettaCodeData/Task/Strip-comments-from-a-string/R/strip-comments-from-a-string-2.r
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

7 lines
284 B
R

x <-c(
"apples, pears # and bananas", # the requested hash test
"apples, pears ; and bananas", # the requested semicolon test
"apples, pears and bananas", # without a comment
" apples, pears # and bananas" # with preceding spaces
)
strip_comments(x)