What about
str1.localeCompare(str2)
More Related Contents:
- Count the recurrence of a word
- Repeat String – Javascript [duplicate]
- Repeat a string in JavaScript a number of times
- How to get character array from a string?
- Check if a JavaScript string is a URL
- How to check if a string contains text from an array of substrings in JavaScript?
- How to remove text from a string?
- How to replace all dots in a string using JavaScript
- How to convert a string to an integer in JavaScript?
- How can I convert a comma-separated string to an array?
- How to set object property (of object property of..) given its string name in JavaScript?
- Get Substring between two characters using javascript
- Shorten string without cutting words in JavaScript
- How to find indices of all occurrences of one string in another in JavaScript?
- How can I insert a character after every n characters in javascript?
- How can I remove a character from a string using JavaScript?
- How to tell if a string contains a certain character in JavaScript?
- Javascript – return string between square brackets
- Case insensitive string replacement in JavaScript?
- JavaScript string with new line – but not using \n
- Trim specific character from a string
- Wrap tags around http text
- Prepend text to beginning of string
- How to parse JSON string in Typescript
- Commas messing with number input in Javascript
- Are double and single quotes interchangeable in JavaScript?
- Use RegExp to match a parenthetical number then increment it
- How to debug identical strings that do not equal in google app script?
- How to add spaces between every character in a string?
- javascript – Convert array to string while preserving brackets