System.Windows.Controls.Extensions.Contains C# (CSharp) Method

Contains() public static method

An implementation of the Contains member of string that takes in a string comparison. The traditional .NET string Contains member uses StringComparison.Ordinal.
public static Contains ( this s, string value, StringComparison comparison ) : bool
s this The string.
value string The string value to search for.
comparison StringComparison The string comparison type.
return bool
        public static bool Contains(this string s, string value, StringComparison comparison)
        {
            return s.IndexOf(value, comparison) >= 0;
        }
    }