请输入您要查询的百科知识:

 

词条 Natural sort order
释义

  1. References

  2. External links

Natural sort order is an ordering of strings in alphabetical order, except that multi-digit numbers are ordered as a single character. Natural sort order has been promoted as being more human-friendly ("natural") than the machine-oriented pure alphabetical order.[1]

For example, in alphabetical sorting "z11" would be sorted before "z2" because "1" is sorted as smaller than "2", while in natural sorting "z2" is sorted before "z11" because "2" is sorted as smaller than "11".

Alphabetical sorting:

  1. z11
  2. z2

Natural sorting:

  1. z2
  2. z11

Functionality to sort by natural sort order is built into many programming languages and libraries.[2][3][4][5]

References

1. ^{{cite web|url=http://blog.codinghorror.com/sorting-for-humans-natural-sort-order/|title=Sorting for Humans : Natural Sort Order|website=blog.codinghorror.com}}
2. ^{{cite web|url=http://php.net/manual/en/function.natsort.php|title=PHP: natsort - Manual|website=php.net}}
3. ^{{cite web|url=http://search.cpan.org/~bingos/Sort-Naturally-1.03/lib/Sort/Naturally.pm|title=Sort::Naturally - search.cpan.org|website=search.cpan.org}}
4. ^{{cite web|url=https://github.com/SethMMorton/natsort|title=natsort: Simple yet flexible natural sorting in Python.|first=Seth M.|last=Morton|publisher=|via=PyPI}}
5. ^{{cite web|url=http://www.mathworks.com/matlabcentral/fileexchange/34464-customizable-natural-order-sort|title=Customizable Natural-Order Sort - File Exchange - MATLAB Central|publisher=}}

External links

  • Alphabetizer Natural Sort Order.

1 : Collation

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/11 21:31:53