DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Oct 2004
    Location
    Chicago
    Posts
    108

    Angry Comparing Strings

    I am trying to compare user input to variables that i have defined.
    I want jave to ignore the cases when the strings are compared. Does anybody have any suggestions/hints?

  2. #2
    Join Date
    Oct 2004
    Posts
    2

    equalsIgnoreCase

    You can use "equalsIgnoreCase(String anotherString)" method of Strings class. It works just like equals method except, it makes case-insensitive comparisons. Please post a reply saying whether this solved ur problem or not.
    If u have a difficult task on hand, give it to a lazy person. They'll find an easier way to do it!!

  3. #3
    Join Date
    Oct 2004
    Location
    Chicago
    Posts
    108

    Thumbs up

    Yes this is what i needed thank you very much.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links