can i get string from string contains? when i type "asdsahello1" how to get string on list only "hello1" in contains string.
public class FindContainsText : MonoBehaviour
{
private string[] test = { "hello1", "hello2" };
public Inputfield inputText;
void Update()
{
foreach (string x in test)
{
if(inputText.Contains(x))
{
string getString;
getString=//inputText.Contains(x) how?
}
}
}
}
for( int i=0 ; i<array.Length )loop here. Givenif(true) break;,iwill be index you're looking forinputText.Contains(x)rather thaninputText.Contains.x.