Answers for "unity string split"

C#
13

unity string split

string example = "Give_me_a_like_please";

string[] splitArray =  example.Split(char.Parse("_")); //return one word for each string in the array
//here, splitArray[0] = Give; splitArray[1] = me etc...

for(int i = 0; i < splitArray.Lenght; i++)
{
	Debug.Log(splitArray[i]);
}

//This shows in the console "Give" "me" "a" "like" "please"
Posted by: Guest on April-03-2020

C# Answers by Framework

Browse Popular Code Answers by Language