/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function compare_strings(a, b) { a = a.toLowerCase(); a = a.replace("ä", "ae"); a = a.replace("ö", "oe"); a = a.replace("ü", "ue"); a = a.replace("ß", "ss"); b = b.toLowerCase(); b = b.replace("ä", "ae"); b = b.replace("ö", "oe"); b = b.replace("ü", "ue"); b = b.replace("ß", "ss"); return (a == b)? 0: (a > b)? 1: -1; }