Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity how to get the first word from string

string test = "first second";

print(test.Split(new char[] { ' ' })[0]);
print(test.Split(new char[] { ' ' })[1]);
 
PREVIOUS NEXT
Tagged: #unity #word #string
ADD COMMENT
Topic
Name
7+4 =