Compare strings disregard case
November 26, 2013 on 7:50 pm | In Programming | No CommentsFound this on one of the many forums looking for a way to find out if a string is present within another one, without having to worry about lower case or upper case.
string title = “STRING”
if (title.IndexOf(“string”, 0, StringComparison.CurrentCultureIgnoreCase) != -1)
{ // The string exists in the original }
No Comments yet »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds.
Valid XHTML and CSS. ^Top^