How to compare character ignoring case in primitive types
问题 I am writing these lines of code: String name1 = fname.getText().toString(); String name2 = sname.getText().toString(); aru = 0; count1 = name1.length(); count2 = name2.length(); for (i = 0; i < count1; i++) { for (j = 0; j < count2; j++) { if (name1.charAt(i)==name2.charAt(j)) aru++; } if(aru!=0) aru++; } I want to compare the Character s of two String s ignoring the case. Simply using IgnoreCase doesn\'t work. Adding \'65\' ASCII value doesn\'t work either. How do I do this? 回答1: The