This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to make case insensitive in android  RSS feed

 
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i want to make the coding case insensitive in android


i want to give an case insensitive statement in this line

if (listview_array[i].indexOf(et.getText().toString()) != -1)

where to give this case insensitive ? can any one help me ?
 
Saloon Keeper
Posts: 4476
112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The String class has a method that returns a lowercase variant of the string. If you apply that to both strings in your comparison it should work fine.
 
deepika deepi
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya got it. thank's
 
My pie came with a little toothpic holding up this tiny ad:
free 1 hour java lesson
https://coderanch.com/t/695988/free-hour-java-lesson
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!