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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top