Group Names & Numbers

Post your Eldemore questions and site suggestions here.

Group Names & Numbers

Postby Tekla » Sun Jan 01, 2017 3:34 am

sorry for the vague title, but there isn't a particularly good way to describe this.

so, it's kind of annoying to have groups with numbers order like this:
http://prntscr.com/dq8v7j

I'm not looking for workaround suggestions or why it works this way; I already have workarounds going, and I know why it works like this.

What I want to know: is this something that can be altered such that group names that include numbers go by actual increasing numerical value (1, 2, 10; aka, the normal way)?
basically, if I have 11 groups that are numbered, I'd like 10 to sort below 9, not below 1 simply because 1 and 10 happen to begin with the same number.

(: Thanks.
Image
I WILL NOT BE VERY ACTIVE HERE UNTIL THE SITE REOPENS. I will still check in occasionally for trades. If you want to trade your FR for my Eld, please message me on FR - my username is Kadaj.

Eld Trades | Offsite Trades

Art shop [closed]

Image
User avatar
Tekla
 
Posts: 2310
Joined: Fri Nov 22, 2013 3:24 am

Re: Group Names & Numbers

Postby Scyanatha » Sun Jan 01, 2017 9:19 am

I'm not sure if it would be possible to make things sort 10 sort after 9 instead of in between 1 and 2, coding-wise. But if you include a zero at the beginning of numbers below 10 - thus making every number a two-digit number - it will sort 0-99 in the proper order.
Example: 01 - 02 - 05 - 10 - 22 - etc instead of 1 - 10 - 2 - 22 - 5 - etc.
Basically, if every number has the same amount of digits, it will properly sort all of them in order of numerical value.

However, normal sort by alphabet/value sorts first on the first character/digit, then the second, third, and so forth; never on the number or word as a whole, much like it would sort "five" before "one" but after "eight".

I'm not a coder, though, so I do not claim to know everything about this sort of thing.
Image
ImageImage
♥~~~~~~~~~~~~~~~~♥~~~~~~~~~~~~~~~~~♥
ImageImage
♥~~~~~~~~~~~~~~~~~♥~~~~~~~~~~~~~~~~♥
ImageImage


User avatar
Scyanatha
 
Posts: 1493
Joined: Wed Nov 04, 2015 7:21 am

Re: Group Names & Numbers

Postby Zayin » Mon Jan 02, 2017 9:53 pm

As Scyanatha suggested, only by using leading zeros (01, 02, 03, 10...), that's pretty much the standard way of doing it. When computers sort alphabetically, they take strings one character at a time, not trying to parse them as numbers, but letters only. The sorting algorithm wouldn't understand the difference between "a" and "1", except that one must come before the other. There's no consideration for what the second or third character will be until the first ones have been sorted. It's that way in pretty much any system, just try making a bunch of folders in Windows named 1, 2, 3, 10.

So the answer is no, there isn't a way (without a whole bunch of extra coding) to sort those numerically AND alphabetically. Now if all the group names were numbers, it'd be different. But the system only knows that they are titles.






























Forevermore wrote:
Image































-Site Help Corner-



Report Site Glitches Here

Rarity Updates

Site & Forum Rules

Eldemore Lore & Info



Image
"To Watch and Protect"

ImageImageImage
ImageImageImage
User avatar
Zayin
Code Wizard
 
Posts: 534
Joined: Thu Jan 17, 2013 11:29 pm


Return to Site Help, Questions and Suggestions

Who is online

Users browsing this forum: No registered users and 7 guests

cron