Page 2 of 2

Posted: Thu Dec 23, 2004 3:50 am
by J. Baker
Nice work Wilbert! On your speed test I got 0ms and 10ms, very fast indeed. :D

KoolMoves Rocks! :D

Posted: Sat Dec 25, 2004 9:29 am
by blueznl
hey nog een nederlander...

although i'm not much into using libs, this one may come in handy :-)

Posted: Sat Dec 25, 2004 5:06 pm
by wilbert
Hi Joe, You are right...
KoolMoves / EazyFlash (japanese version) / Freestyle Flash (dutch version)
Rocks :D

En inderdaad blueznl... nog een nederlander. Je komt ze ook overal tegen he :wink:

About arrays...
I also want to do some array push / pop functions if they won't appear in PB 4.0. I think it would be great if you could split a string into an array and pop off items until the array is empty.

Posted: Tue Jan 18, 2005 12:22 pm
by eriansa
very handy - zeer handig
thanks a lot - hartelijk dank

...en dat voor een hollander :wink:

Posted: Tue Jan 18, 2005 12:40 pm
by wilbert
eriansa wrote:...en dat voor een hollander :wink:
Brabant grenst aan Vlaanderen hè. :idea:
Misschien dat dat een hoop verklaart :wink:

Posted: Tue Jan 18, 2005 8:51 pm
by blueznl
intelligence knows no borders :-)

Posted: Wed Jan 19, 2005 8:54 am
by eriansa
There is an error in your routine : see ->

Code: Select all

Dim arrValuelist.s(0)
sz.s="10:20,10,50,10,90"
For i = 0 To 9
Select i
Case 0
  sz.s="11111111111111111111111111111"
Case 1
  sz.s="10,111"
Case 2
  sz.s="101,111"
Case 3
  sz.s="1010,111"
Case 4
  sz.s="10101"
Case 5
  sz.s="1010"
Case 6
  sz.s="101"
Case 7
  sz.s="10"
Case 8
  sz.s="1"
Case 9
  sz.s="11111111"
EndSelect
arrValuelist() = wb_SplitStringByChar(sz, ",", #True, arrValuelist())
NrOfValues = wb_ArrayCount(arrValuelist())
Debug arrValuelist(0)
Next

Posted: Wed Jan 19, 2005 11:32 am
by eriansa
Het werkt wel als je steeds een seperator vermeldt (in dit geval een comma)

Code: Select all

Dim arrValuelist.s(0)
sz.s="10:20,10,50,10,90"
For i = 0 To 9
Select i
Case 0
  sz.s="11111111111111111111111111111"
Case 1
  sz.s="10,111" + ","
Case 2
  sz.s="101,111" + ","
Case 3
  sz.s="1010,111" + ","
Case 4
  sz.s="10101" + ","
Case 5
  sz.s="1010" + ","
Case 6
  sz.s="101" + ","
Case 7
  sz.s="10" + ","
Case 8
  sz.s="1" + ","
Case 9
  sz.s="11111111"
EndSelect
arrValuelist() = wb_SplitStringByChar(sz, ",", #False, arrValuelist())
NrOfValues = wb_ArrayCount(arrValuelist())
Debug arrValuelist(0)
Next

Posted: Wed Jan 19, 2005 5:46 pm
by wilbert
Would you please try if this version works fine ?
www.geboortegrond.nl/pb/wb_Lib.zip

Wilbert

Posted: Wed Jan 19, 2005 9:05 pm
by eriansa
Looks OK!
Thanks a lot.

Re: Very fast split string to array function

Posted: Fri Dec 15, 2023 11:22 am
by tatanas
Hi Wilbert,

I was looking for a fast split string to array function and found this topic.
I know it's a pretty old one :? but I can't get your zip. I guess there should be some code updates since 2004...

Do you have a Purebasic 6 compatible version of this code ?

Thanks for your time.

Re: Very fast split string to array function

Posted: Fri Dec 15, 2023 12:00 pm
by mk-soft

Re: Very fast split string to array function

Posted: Fri Dec 15, 2023 1:48 pm
by wilbert
tatanas wrote: Fri Dec 15, 2023 11:22 am I know it's a pretty old one :? but I can't get your zip. I guess there should be some code updates since 2004...
You can still down;oad it
https://w73.nl/pb/split.zip
but it's not a code source but a user library.
I don't even know if I still have the original source code and if it still works it would be only for the 32 bit x86 version of PB :shock:
So maybe the alternative mk-soft created is a better solution for PB 6.x .

Re: Very fast split string to array function

Posted: Fri Dec 15, 2023 2:06 pm
by AZJIO
tatanas wrote: Fri Dec 15, 2023 11:22 am Do you have a Purebasic 6 compatible version of this code ?
https://www.purebasic.fr/english/viewto ... 82#p486382
https://www.purebasic.fr/english/viewtopic.php?t=80656

Re: Very fast split string to array function

Posted: Fri Dec 15, 2023 2:35 pm
by tatanas
Thank you very much. I've got everything I need.