Knowledge

Natural sort order

Source 📝

35:, except that multi-digit numbers are treated atomically, i.e., as if they were a single character. Natural sort order has been promoted as being more human-friendly ("natural") than machine-oriented, pure alphabetical sort order. 78:
was conceived and implemented overnight on-site as an entry for the Best Hack contest. Dave Koelle wrote the Alphanum Algorithm in 1997 and Martin Pool published Natural Order String Comparison in 2000.
67:
Functionality to sort by natural sort order is now widely available in software libraries for many programming languages. During the 1996
42:
is sorted as smaller than "2", while in natural sorting "z2" is sorted before "z11" because "2" is treated as smaller than "11".
165: 96: 39: 38:
For example, in alphabetical sorting, "z11" would be sorted before "z2" because the "1" in the first
231: 8: 279: 199: 75: 32: 180: 114: 72: 273: 132: 259: 245: 151: 28: 217: 166:"Customizable Natural-Order Sort - File Exchange - MATLAB Central" 68: 200:"NaturalSort.Extension: Support for natural sorting in .NET/C#" 152:"natsort: Simple yet flexible natural sorting in Python" 271: 260:"Martin Pool's Natural Order String Comparison" 97:"Sorting for Humans : Natural Sort Order" 16:The ordering of strings in alphabetical order 181:"NaturalSort: Natural Sort Order in Julia" 178: 197: 272: 232:"TidBITS: The Natural Order of Things" 149: 179:Kornblith, Simon (25 December 2021). 150:Morton, Seth M. (23 December 2021). 13: 246:"Dave Koelle's Alphanum Algorithm" 14: 291: 218:"Natural Order Numerical Sorting" 198:Pažourek, Tomáš (1 April 2022). 133:"Sort::Naturally - metacpan.org" 252: 238: 224: 210: 191: 172: 158: 143: 125: 107: 89: 71:conference, the Natural Order 1: 82: 7: 10: 298: 115:"PHP: natsort - Manual" 45:Alphabetical sorting: 101:blog.codinghorror.com 103:. 12 December 2007. 29:ordering of strings 234:. 3 February 1997. 33:alphabetical order 21:natural sort order 154:– via PyPI. 56:Natural sorting: 287: 264: 263: 256: 250: 249: 242: 236: 235: 228: 222: 221: 214: 208: 207: 195: 189: 188: 176: 170: 169: 162: 156: 155: 147: 141: 140: 129: 123: 122: 111: 105: 104: 93: 76:System Extension 297: 296: 290: 289: 288: 286: 285: 284: 270: 269: 268: 267: 258: 257: 253: 244: 243: 239: 230: 229: 225: 216: 215: 211: 196: 192: 177: 173: 164: 163: 159: 148: 144: 131: 130: 126: 113: 112: 108: 95: 94: 90: 85: 25:natural sorting 17: 12: 11: 5: 295: 294: 283: 282: 266: 265: 251: 237: 223: 209: 190: 171: 157: 142: 124: 106: 87: 86: 84: 81: 65: 64: 61: 54: 53: 50: 19:In computing, 15: 9: 6: 4: 3: 2: 293: 292: 281: 278: 277: 275: 261: 255: 247: 241: 233: 227: 219: 213: 205: 201: 194: 186: 182: 175: 167: 161: 153: 146: 138: 134: 128: 120: 116: 110: 102: 98: 92: 88: 80: 77: 74: 70: 62: 59: 58: 57: 51: 48: 47: 46: 43: 41: 36: 34: 30: 26: 22: 254: 240: 226: 212: 203: 193: 184: 174: 160: 145: 137:metacpan.org 136: 127: 118: 109: 100: 91: 66: 55: 44: 37: 24: 20: 18: 204:github.com 185:github.com 83:References 280:Collation 27:) is the 274:Category 119:php.net 69:MacHack 73:Mac OS 40:string 23:(or 63:z11 49:z11 31:in 276:: 202:. 183:. 135:. 117:. 99:. 60:z2 52:z2 262:. 248:. 220:. 206:. 187:. 168:. 139:. 121:.

Index

ordering of strings
alphabetical order
string
MacHack
Mac OS
System Extension
"Sorting for Humans : Natural Sort Order"
"PHP: natsort - Manual"
"Sort::Naturally - metacpan.org"
"natsort: Simple yet flexible natural sorting in Python"
"Customizable Natural-Order Sort - File Exchange - MATLAB Central"
"NaturalSort: Natural Sort Order in Julia"
"NaturalSort.Extension: Support for natural sorting in .NET/C#"
"Natural Order Numerical Sorting"
"TidBITS: The Natural Order of Things"
"Dave Koelle's Alphanum Algorithm"
"Martin Pool's Natural Order String Comparison"
Category
Collation

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.