- Home /
Question by
aditya_tirodkar · Dec 02, 2012 at 07:23 AM ·
javascriptstring.split
Split a String in Unity Javascript
Hey...
I need to obtain the words in a string:
var questans = new String[10, 10];
questans[0,0]="Hey How's it going?";
var words=questans[0,0].Split(" "[0]);
print (questans[0,0]);
print (words);
I'm getting System.String[] as the output instead of the words. Please help me out.
Comment
Answer by Eric5h5 · Dec 02, 2012 at 07:26 AM
It's correct; Split returns a String[] array. If you want to print the words then loop through the array and print each element.
Your answer
Follow this Question
Related Questions
Setting Scroll View Width GUILayout 1 Answer
Can someone help me fix my Javascript for Flickering Light? 6 Answers
Item Pick-up for movement 1 Answer
Java Script command list 3 Answers
Pairing and GUITexture with a Timer? 1 Answer