Log In  

Cart #split_string-0 | 2018-12-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

SPLIT_STRING is make a table with using a delimiter from string value.
There output the all value become string value in table.

split(string, delimiter, delimiter-2d)

a=split('1 a 20 split_test --------',' ')

for v in all(a) do
print(v)
end

a=split('1 2 3;a b c;this is split',' ',';')
for b in all(a) do
    for v in all(b) do
     print(v)
    end
end
P#59851 2018-12-09 09:45 ( Edited 2018-12-09 09:47)

:: sparr

Thanks for inspiring me to write this, which splits on any number of delimiters, producing a that-many-dimensional array: https://github.com/sparr/pico8lib/blob/master/strings.p8#L194

P#72867 2020-02-07 07:54

Is ...

a tuple!

I knew for the first time!!
Thank you for tell me!

P#73016 2020-02-12 13:55

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2020-04-07 05:12 | 0.016s | 2097k | Q:30