↕️ Advanced Text Sorter
字典序
中文拼音
長度升序
長度降序
數字升序
數字降序
自然排序
隨機
反轉
📋 結果
請輸入文本...
📚 深度解析:高階排序
💡 常見使用場景
- 按某列排序:對「名字,分數」這類帶分隔的行,按第二列數值排。
- 自然排序:把「img2、img10」按數值而非字元排,避免 10 在 2 前。
- 按長度/自定義鍵:按行長度或抽取的數字排序,滿足特殊需求。
按分數降序排
輸入「張三,85/李四,92/王五,78」,按第 2 列數值降序得「李四92/王五78/張三85」?實際為李四92、張三85、王五78,便於看排名。
❓ 常見問題(FAQ)
- 列分隔符怎麼定?
- 可指定逗號/製表符/空格;多空格建議用製表符或先規範分隔,否則列識別會錯位。
- 自然排序解決什麼?
- 普通排序把『10』當『1』『0』排在『2』前;自然排序識別數字整體,『2、10、100』順序正確,適合檔名與編號。
Formula & Standard References
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Collation | text sorting follows locale collation rather than raw code point order | Unicode UTS #10, collation algorithm |
| Multi-level comparison | collation compares base letters then accents then case in levels | Unicode UTS #10, collation algorithm |
| Natural ordering | numeric aware ordering prevents ten from sorting before two | ISO/IEC 14651, international string ordering |
⚠️ 使用說明與注意事項
- 本工具純前端執行,資料不會上傳到伺服器
- 建議在主流瀏覽器(Chrome/Safari/Firefox/Edge)中使用
- 計算結果僅供參考,請以實際應用場景為準