If i have List PhoneDirectory Eg:
['John:009878788677' , 'Jefrey:67654654645' , 'Maria:8787677766']
Which is the function that can be use to compare the Presence of Substring (Eg: Joh) in each entry in the List .
I have tried using
if(PhoneDirectory.find(Joh) != -1)
but it doesnt work
kindly Help..