Forums Register Login

Does Criteria checks for equal, ignoring case?

+Pie Number of slices to send: Send
Hello

See my code below:



The above code checks db for address value equal to tme.getAddress(). If found, prints "Already Exists", else inserts it into database.

Suppose, if there is a value 'Mumbai; in db, and 'tme.getAddress' has String 'mumbai'. It will be inserted. What i want is that it should check for address ignoring case.

How should i proceed?
+Pie Number of slices to send: Send
The problem has been solved by using ".ignoreCase()" method.

Thanks
Oh, sure, you could do that. Or you could eat some pie. While reading this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 790 times.
Similar Threads
Autoboxing with equal method
equal/== help
Strings' Puzzle!
please explain me the output of the following programs
simple question regarding strings
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 09:04:07.