How to get an entire string in different variables?


how to get whole string in different variables?

I have single string which contain 5 names and there is a space between every single name,now i want to get these five names in to different ,different string

for ex i have string like below

String name= ABC DEF GHI JKL MNO;

and i wan to get these string like below(removing space)

String a=ABC;

String b=DEF;

String c=GHI;

String d=JKL;

String e=MNO

For PHP/Java/JavaScript AND C# the explode() function may be what you're looking for.

Example in PHP:

$strings[] = explode(" ", $name);