Tokenize a string: Difference between revisions
Content added Content deleted
m (→{{header|Objective-C}}: ww nl) |
No edit summary |
||
Line 612: | Line 612: | ||
<lang python>print '.'.join('Hello,How,Are,You,Today'.split(','))</lang> |
<lang python>print '.'.join('Hello,How,Are,You,Today'.split(','))</lang> |
||
=={{header|R}}== |
|||
<lang R> |
|||
text <- "Hello,How,Are,You,Today" |
|||
junk <- strsplit(text, split=",") |
|||
print(paste(unlist(junk), collapse=".")) |
|||
</lang> |
|||
or the one liner |
|||
<lang R> |
|||
paste(unlist(strsplit(text, split=",")), collapse=".") |
|||
</lang> |
|||
=={{header|Raven}}== |
=={{header|Raven}}== |