Fix String.Replace implementation (dotnet/coreclr#11039)
authorTarek Mahmoud Sayed <tarekms@microsoft.com>
Tue, 18 Apr 2017 05:02:08 +0000 (22:02 -0700)
committerGitHub <noreply@github.com>
Tue, 18 Apr 2017 05:02:08 +0000 (22:02 -0700)
commit5615d90fb5c0553f199405d4b08d81401ca16937
tree401420712f08303c1543c06988aacc3ab42341f5
parentc3d803bbd68150c4bf5de580bb1f91629358d85a
Fix String.Replace implementation (dotnet/coreclr#11039)

* Fix String.Replace implementation

String.Replace was callin ga low level CompareInfo method IndexOfCore which cannot be called in some conditions like when using ordinal ignore case option or when running in invariant mode.
The fix is to call a higher level method in CompareInfo which can handle such cases becfore calling the lower level method

* fix typo

Commit migrated from https://github.com/dotnet/coreclr/commit/cb371832f635664f74f99b9e0fa405eef2148a2f
src/coreclr/src/mscorlib/src/System/Globalization/CompareInfo.cs
src/coreclr/src/mscorlib/src/System/String.Manipulation.cs