Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

comparsion of two strings without ignoring usecases and spaces  RSS feed

 
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!