Hi,

How to get the value from a hashtable irrespective of its case...
plz reply ASAP.

Thanks in advance,
Shilpa

When you add the keys, upper case them, and then uppercase the "search" key when retrieving one. Otherwise, you are going to have to loop through the keys yourself using equalsIgnoreCase to find the right key.

How to get the value from a hashtable irrespective of its case...

Would you care to mention what does your Hashtable contain or do I have to find that out from my crystal ball.

When you add the keys, upper case them, and then uppercase the "search" key when retrieving one. Otherwise, you are going to have to loop through the keys yourself using equalsIgnoreCase to find the right key.

Hi,

Thanks for the reply.
I think its better to convert either to upper or lower case.

And, with the way the post reads, so do I. That is the reason it is formulated the way it is. The other is still an option though, which is why it was mentioned.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.