Tweak IndexOfOrdinal for empty value
authorStephen Toub <stoub@microsoft.com>
Fri, 3 Apr 2015 12:44:39 +0000 (08:44 -0400)
committerStephen Toub <stoub@microsoft.com>
Fri, 3 Apr 2015 12:44:39 +0000 (08:44 -0400)
A System.Runtime test was failing because IndexOf should return the startIndex rather than 0 when passed an empty search value.

src/mscorlib/corefx/System/Globalization/CompareInfo.Unix.cs

index 8091eeb..70dfe90 100644 (file)
@@ -21,7 +21,7 @@ namespace System.Globalization
 
             if (value.Length == 0)
             {
-                return 0;
+                return startIndex;
             }
 
             if (ignoreCase)