Android search list, String

Posted by NightSky on Stack Overflow See other posts from Stack Overflow or by NightSky
Published on 2013-07-03T04:53:38Z Indexed on 2013/07/03 5:05 UTC
Read the original article Hit count: 69

Filed under:
|
|
|

Hey guys what is the best way to search through my list of objects, they return a few strings, last name and first name for example.

Here how i'm currently searching but my search needs to match the entire string which I don't want. The search needs it to match part of the string like our contacts list on our phone and ignore the case.

if (searchQ.equalsIgnoreCase(child.first_name)) {
   addChildToList(child); 
    } 

Ive tried contains and starts with for example, they did not work. Whats going on?

Thanks! Cheers!

© Stack Overflow or respective owner

Related posts about java

Related posts about android