Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

comparsion of two strings without ignoring usecases and spaces

 
Miss Zara
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello frnds....

i m facing problem in this code....i want to compare the strings...for entering only unique values

String uniquenessCheck() {
LinkedHashMap instances = getInstanceList();

if (instances != null) {
Iterator instanceIter = instances.values().iterator();

while (instanceIter.hasNext()) {
TVCreative thisCreative = (TVCreative) instanceIter.next();

String compareTitle = getCreativeTitle().trim().toLowerCase();

if (thisCreative.getCreativeTitle().toLowerCase().equals(compareTitle)
return "creativeTitle";
}
}

return null;
}
 
Vijayendra V Rao
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you able to compile this piece of code in the first place? If yes, then tell us the actual problem that you are facing.
 
rubbery bacon. rubbery tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!