Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×

Sort A-Z working as intended?

Hello, I have been working on a game here for quite some time now and I can start off congratulating the team for this awesome site. But I just found something that did not work as I wanted it to do, but that is not the same as it's not working as intended. I'm a big folder guy, so I like to organize my things into folders then using your function "Sort A-Z". But the problem I had now is that I had a name with a lowercase letter at the start (fon Dhymmel) and I wanted it to get put between E and G, but it got placed behind W. So I guess you sort by Upper- and lowercase letters? Is it working as intended and should I just make the first letter a uppercase?
1486412590

Edited 1486413000
Lithl
Pro
Sheet Author
API Scripter
The sorting is most likely being done by character code. In this case, "W" is #87 (in both ASCII and Unicode), while "f" is #102. This is also why people can force items to the top of the sorted list by prepending spaces (#32). It's certainly possible  for the devs to perform the sort in a case-insensitive manner. Compare: ['Foo', 'bar'].sort(); // => ['Foo', 'bar'] ['Foo', 'bar'].sort((a, b) => a.toLocaleLowerCase().localeCompare(b.toLocaleLowerCase())); // => ['bar', 'Foo']
With my light knowledge of programming your answer makes a lot of scenes to me. Thanks for your reply and time, have a good one!