Sad thing is, the Contains does not have it. So here is a small extension that fixes it with the help of IndexOf method
Some source-code (C#) to copy into your utilities class.
public static bool Contains(this string s, string sub, StringComparison comparison) { return s.IndexOf(sub, comparison) != -1; }
Hope this helps someone out there :)
Back to extensions list
No comments:
Post a Comment