Last active
March 1, 2021 15:58
-
-
Save vyspiansky/6398296 to your computer and use it in GitHub Desktop.
JavaScript: good cyrillic string comparison
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var str1 = "Ґав не лови"; | |
var str2 = "Єдність людини і природи"; | |
var res = str1.localeCompare(str2); // result: -1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment