Go to: Synopsis. Return value. Related. MEL examples.
string[] stringToStringArray(string $string, string $separationString)
None
Variable Name | Variable Type | Description |
---|---|---|
$string | string | The string to break up into individual strings. |
$separationString | string | Defines the characters that break up the individual strings. |
string $array[]; $array = stringToStringArray("red blue green", " "); print ("// " + $array[0] + "\n"); print ("// " + $array[1] + "\n"); print ("// " + $array[2] + "\n"); // red // blue // green $array = stringToStringArray("Hey, what's your name?", " ,?"); print ("// " + $array[0] + "\n"); print ("// " + $array[1] + "\n"); print ("// " + $array[2] + "\n"); print ("// " + $array[3] + "\n"); // Hey // what's // your // name $array = stringToStringArray("/user/directory/documents/file", "/"); print ("// " + $array[0] + "\n"); print ("// " + $array[1] + "\n"); print ("// " + $array[2] + "\n"); print ("// " + $array[3] + "\n"); // user // directory // documents // file