Mar
01
2005
An case insensitive IndexOf
Posted by admin under
.NET

Well the header says it all. And it's an easy way to do it - at least when you know about it:)
int nIndex = System.Globalization.CultureInfo.CurrentCulture.CompareInfo.IndexOf( sSource, sFindString, System.Globalization.CompareOptions.IgnoreCase);
2
3
view plain | print | copy to clipboard
int nIndex = System.Globalization.CultureInfo.CurrentCulture.CompareInfo.IndexOf(
sSource,
sFindString,
System.Globalization.CompareOptions.IgnoreCase);