"Extract" from a string

lets say I have this string:

var rawData : String = "Joe ; 99 ; Bacon";

How can I convert this string to a string array?

I know a possible way but I’ve no idea how to code it

if rawData.Find “;” then the previous letters (Joe) goes to a newArray[1] etc…

You need to use String.Split -

    var array = rawData.Split(";"[0]);

But that will leave the spaces in - if you don’t want them you’d need to do something like this:

   import System.Linq;

   var array = rawData.Split(";"[0]).Select(function(c) c.Trim()).ToArray();