erquhart
erquhart17mo ago

How do gt(e)/lt(e) index methods work with strings?

I swear I saw this covered somewhere but couldn't find it. How do lt/gt methods on indexes handle strings - do uppercase/lowercase letters follow js character code order or something else?
2 Replies
lee
lee17mo ago
Strings are ordered based on their utf8 encoding -- which is often the same ordering as js character codes which are utf16. In particular, all uppercase letters are less than lowercase letters.
erquhart
erquhartOP17mo ago
Got it, thank you

Did you find this page helpful?