How to get prefix string in Android?

I work in an Android application using hasPrefix to get the first string value in iphone, but I did not know how to do this? Please help me

In iphone:

Name =@"Thomas edward";
if ([result hasPrefix:Thomas])  
{

}

Like Android, how to do it?

Thanks in advance

+5
source share
1 answer

You can use startsWith or check the row index

if(result.startsWith("Thomas")) 
{

}
+9
source

All Articles