• String.Explode
    2 replies, posted
Is their any way to explode lines, tried using [lua]string.Explode(contents, "\n")[/lua] Contents is a valid string, and the explode just returns a table with a one empty value
The separator is the first argument in string.Explode(), so it should be: [lua] string.Explode("\n", "FirstLine\nSecondLine") -- will return { "FirstLine", "SecondLine" } [/lua]
Thanks
Sorry, you need to Log In to post a reply to this thread.