Hi,

I think you’re right, It could be simpler to do it like that. 

I have checked “localeCompare”, it does compare case sensitive strings but it 
doesn’t compare strings in an array and to do it, you will have to execute the 
method as many times as strings in an array. By using ignoreCase method, you 
will pass specific array and the method will do it for you inside. Second 
thing, “localeCompare” returns numbers: 0, 1, -1, -2 depends on the result, a 
method proposed by me returns true or false.

Another thing would be that “localeCompare” is heavier that ignoreCase method. 
I think we should have lightweight alternative to compare case sensitive 
strings.
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to