A friend of mine came to me with this strange behavior which i can\'t explain, any insight view would be appreciated.
Im running VS 2005 (C# 2.0), the following code
0 is correct. The Javadocs point out that indexOf works as follows:
indexOf
The integer returned is the smallest value k such that: this.startsWith(str, k)
The integer returned is the smallest value k such that:
this.startsWith(str, k)
Any string starting with "" is equal to the original string (and every string starts with ""), so the smallest k for str = "" is always 0.
""
k
str = ""