RosettaCodeData/Task/Tokenize-a-string/J/tokenize-a-string-1.j

11 lines
238 B
Text
Raw Permalink Normal View History

2013-04-11 01:07:29 -07:00
s=: 'Hello,How,Are,You,Today'
] t=: <;._1 ',',s
+-----+---+---+---+-----+
|Hello|How|Are|You|Today|
+-----+---+---+---+-----+
; t,&.>'.'
Hello.How.Are.You.Today.
'.' (I.','=s)}s NB. two steps combined
Hello.How.Are.You.Today