simple Split function that splits to array or list

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
TheAutomator
Enthusiast
Enthusiast
Posts: 112
Joined: Tue Dec 01, 2020 8:33 pm

simple Split function that splits to array or list

Post by TheAutomator »

Something vbscript like:

Split(Str, By)

parameters:

( "string", "delimiter(s)" )

in and output:

IN = Split("a b c", " ")
OUT = ARRAY ["a", "b", "c"]

why? because now the string field one has to re-split the same string every time you call it.. (to slow).
Now i always have to use rexexp or custom function..

regards
Rinzwind
Enthusiast
Enthusiast
Posts: 636
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

Re: simple Split function that splits to array or list

Post by Rinzwind »

+1
This. It should be in a basic and fast command. I think almost every Basic dialect has it.
Split and Join
Post Reply