string.indexof case insensitive

G

Guoqi Zheng

Sir,

To my experience, the string.indexof function is case sensitive. I need it
to be case insensitive, how should I achieve this?

--
Kind regards

Guoqi Zheng
guoqi AT meetholland dot com
Http://www.meetholland.com
 
D

Donald E. Hurley Jr.

Have you tried looking into IndexOfAny and passing both the upper case and
lower case character?

Hope this helps.
 
Joined
Jan 25, 2009
Messages
1
Reaction score
0
This thread is old but its at the top of google search results so it might as well answer the question. Try this overload...
String.IndexOf("findme", StringComparison.CurrentCultureIgnoreCase)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,807
Latest member
ryef

Latest Threads

Top