Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Tokenize-a-string/BaCon/tokenize-a-string.bacon
Normal file
12
Task/Tokenize-a-string/BaCon/tokenize-a-string.bacon
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
OPTION BASE 1
|
||||
|
||||
string$ = "Hello,How,Are,You,Today"
|
||||
|
||||
' Tokenize a string into an array
|
||||
SPLIT string$ BY "," TO array$
|
||||
|
||||
' Print array elements with new delimiter
|
||||
PRINT COIL$(i, UBOUND(array$), array$[i], ".")
|
||||
|
||||
' Or simply replace the delimiter
|
||||
PRINT DELIM$(string$, ",", ".")
|
||||
Loading…
Add table
Add a link
Reference in a new issue