I am using the parse cloud to store data . in this case I have a table "MyUser" in this table I want to search user by name in case insensitive.
Search is working fine but the search operation is not case insensitive
I have to search case insensitive
here is my code.:-
ParseQuery<ParseObject> query = ParseQuery.getQuery("BetsUpUser");
query.whereContains("name", searchData);
query.findInBackground(new FindCallback<ParseObject>() {
public void done(List<ParseObject> objList,ParseException e) {
if (e == null) {
Log.d("score","@@@@Retrieved " + objList.size()+ " scores");
} else {
Log.d("score", "@@@Error: " + e.getMessage());
}
}
});
Thanks in advance.
I Solve the problem of case insensitive string Parse Query
replace the line
query.whereContains("name", searchData);
with
query.whereMatches("name", "("+searchData+")", "i");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With