|
-
Aug 4th, 2004, 03:46 PM
#1
Thread Starter
Lively Member
Case Insenstive search an array
Hi,
I got this string array and I have to find out whether a value is inside that array or not. The simplest solution is to use the static method .indexOf()
Array.indexOf(new string[] {"one","two","three"},"two")
Unfortunately, the search seems to be case sensitive, which I don't want. For instance, the value "Two" wont' be found:
Array.indexOf(new string[] {"one","two","three"},"Two")
I need either to make all the elements lowercase, or to perform a search that is case insenstive. How to do this?
Thanks in advance, bye
- mo! I said MOOOOOOO!!
- ...yep, that's a cow, alright.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|