Contains
public static bool Contains(this string source, string toCheck, StringComparison comp) { return source.IndexOf(toCheck, comp) >= 0; }Example:
string title = "STRING"; bool contains = title.Contains("string", StringComparison.OrdinalIgnoreCase);
Description
a case-insensitive version of String.Contains()
Details
- Author: Jared Par
- Submitted on: 2/16/2012 11:53:42 AM
- Language: C#
- Type: System.String
- Views: 2664
Double click on the code to select all.