First of all, there is a question title that almost exactly matches my question (strstr() equivalent in C#), but he’s referring to a method to do a byte[] comparison version.
I’m looking for a string comparison that outputs the index of the first occurance of str2 in str1, and just cannot find it!
string s1 = ("BetYouCantFooFind");
string s2 = ("Foo");
int idx = strstrC#(s1,s2);
Surely there is an equivalent?
I think you’re looking for
IndexOf: