summaryrefslogtreecommitdiff
path: root/src/mscorlib
diff options
context:
space:
mode:
authorYuri Vanin <yvanin@users.noreply.github.com>2017-06-21 21:57:25 -0700
committerDan Moseley <danmose@microsoft.com>2017-06-21 21:57:25 -0700
commite1ceca5f5099761f9bc3be17fbc5cbd3e2b72ec4 (patch)
tree0b2ef2705e140a06efa47ec936963c6aefc52b9f /src/mscorlib
parentefc4758140f2f0b856d97fc847415a22c8dfefc9 (diff)
downloadcoreclr-e1ceca5f5099761f9bc3be17fbc5cbd3e2b72ec4.tar.gz
coreclr-e1ceca5f5099761f9bc3be17fbc5cbd3e2b72ec4.tar.bz2
coreclr-e1ceca5f5099761f9bc3be17fbc5cbd3e2b72ec4.zip
Add String.Contains overload with StringComparison (#12400)
Staging change of System.Private.CoreLib for CoreFX #20846
Diffstat (limited to 'src/mscorlib')
-rw-r--r--src/mscorlib/src/System/String.Searching.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mscorlib/src/System/String.Searching.cs b/src/mscorlib/src/System/String.Searching.cs
index 411a45c1a7..388b5e17b8 100644
--- a/src/mscorlib/src/System/String.Searching.cs
+++ b/src/mscorlib/src/System/String.Searching.cs
@@ -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.
//