Add String.Contains overload with StringComparison (dotnet/coreclr#12400)
authorYuri Vanin <yvanin@users.noreply.github.com>
Thu, 22 Jun 2017 04:57:25 +0000 (21:57 -0700)
committerDan Moseley <danmose@microsoft.com>
Thu, 22 Jun 2017 04:57:25 +0000 (21:57 -0700)
Staging change of System.Private.CoreLib for CoreFX dotnet/coreclr#20846

Commit migrated from https://github.com/dotnet/coreclr/commit/e1ceca5f5099761f9bc3be17fbc5cbd3e2b72ec4

src/coreclr/src/mscorlib/src/System/String.Searching.cs

index 411a45c..388b5e1 100644 (file)
@@ -16,6 +16,12 @@ namespace System
             return (IndexOf(value, StringComparison.Ordinal) >= 0);
         }
 
+        [Pure]
+        public bool Contains(string value, StringComparison comparisonType)
+        {
+            return (IndexOf(value, comparisonType) >= 0);
+        }
+
         // Returns the index of the first occurrence of a specified character in the current instance.
         // The search starts at startIndex and runs thorough the next count characters.
         //