Oxygen Basic

Programming => Example Code => General => Topic started by: Charles Pegge on June 06, 2018, 03:13:46 AM

Title: Split and Join
Post by: Charles Pegge on June 06, 2018, 03:13:46 AM

Code: [Select]
'2018-06-06T04:08:18
'SPLIT AND JOIN
uses Console
uses ParseUtil
string s 'string to be split
string t 'join string
string a[100] 'array for split data
int c
s=`one two,"three and 'four'", "five and six",(seven,eight),"nine" `
print s cr string(len(s),"=") cr cr
split(s,a,100,c)
int i
for i=1 to c
print i tab a[i] cr
next
join(a,c,chr(34),chr(34,44),t)
print cr t cr
wait

Updated: inc\ParseUtil.inc
Title: Re: Split and Join
Post by: edcronos on June 06, 2018, 04:37:36 AM
Charles, thank you
but not having native tools the programmer has to do his
I even have my version of split and join despite the vba having them natives
I asked more because of the enum I found confused