Is it possible to have the contain function find if the string contains 2 words or more? This is what I\'m trying to do:
string d = \"You hit someone for 50
You could write an extension method with linq.
public static bool MyContains(this string str, params string[] p) { return !p.Cast().Where(s => !str.Contains(s)).Any(); }
EDIT (thx to sirid):
public static bool MyContains(this string str, params string[] p) { return !p.Any(s => !str.Contains(s)); }