This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
PrinzJuliano's profile picture

Need help to split a string

Started by PrinzJuliano, 22 March 2013 - 04:53 AM
PrinzJuliano #1
Posted 22 March 2013 - 05:53 AM
Hello guys,

I need to know for my cloud system how to split a string into a table
like:

String i want to split: "username!BR!password!BR!command"

and now i want to have a table like this

{
[1] = "username",
[2] = "password",
[3] = "command"
}

out of the string up,

and it would be awesome if i can do this with endless compressed variables.

The function should look like this

split(text,pattern)

Thanks, PrinzJuliano
theoriginalbit #2
Posted 22 March 2013 - 05:55 AM
Question has been asked and answered today, here is the thread, have a read, you will find your answer :)/>
http://www.computerc...eperate-string/
PrinzJuliano #3
Posted 22 March 2013 - 05:56 AM
Thanks ;)/>