I need to find pattern into string and found that we can use in or find also. Could anyone suggest me which one will be better/fast on string. I need not to find index of pa
Using in will be faster as using in provides only pattern while if you use find it will give you pattern as well as its index so it will take some extra time in computing the index of the string as compared to in. However if you are not dealing with large data then it dosent matter what you use.