G
Guest
I'm using IndexOf on my strings to find if there are certain words contained
in a string. Well, this works fine except when I'm looking at an empty
string, because the return value is zero based index. With an empty string it
also returns 0, the same as it would with a string where it starts in the
first position (zero value). Is there anyting else to use to search for a
string in the .Net framework or is there a was to use IndexOf with empty
strings but give back something you can count on.
in a string. Well, this works fine except when I'm looking at an empty
string, because the return value is zero based index. With an empty string it
also returns 0, the same as it would with a string where it starts in the
first position (zero value). Is there anyting else to use to search for a
string in the .Net framework or is there a was to use IndexOf with empty
strings but give back something you can count on.