#if NETSTANDARD2_0
using System;
namespace Mongo2Go.Helper
{
public static class NetStandard21Compatibility
{
///
/// Returns a value indicating whether a specified string occurs within this , using the specified comparison rules.
///
/// The string to operate on.
/// The string to seek.
/// One of the enumeration values that specifies the rules to use in the comparison.
/// if the parameter occurs within this string, or if is the empty string (""); otherwise, .
/// is
public static bool Contains(this string @string, string value, StringComparison comparisonType)
{
if (@string == null) throw new ArgumentNullException(nameof(@string));
return @string.IndexOf(value, comparisonType) >= 0;
}
}
}
#endif