|
1 | | -<p align="center"><a href="https://dotnet.microsoft.com/download/dotnet/5.0"><img src="https://img.shields.io/badge/core-%3E=%20v5.0-lightgrey.svg?style=flat&logo=.net&logoColor=white" alt="platform"></a> <a href="https://github.com/Roydl/AlphaNumericComparer/blob/master/LICENSE.txt"><img src="https://img.shields.io/github/license/Roydl/AlphaNumericComparer.svg?style=flat" alt="license"></a> <a href="https://www.nuget.org/packages/Roydl.AlphaNumericComparer"><img src="https://img.shields.io/badge/nuget-%20v1.0.1-lightgrey.svg?style=flat&logo=nuget&logoColor=white" alt="nuget"></a> <a href="https://github.com/Roydl/AlphaNumericComparer/archive/master.zip"><img src="https://img.shields.io/badge/download-source-yellow.svg?style=flat" alt="download"></a> <a href="https://www.si13n7.com"><img src="https://img.shields.io/website/https/www.si13n7.com.svg?style=flat&down_color=red&down_message=offline&up_color=limegreen&up_message=online&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEwSURBVDhPxZJNSgNBEIXnCp5AcCO4CmaTRRaKBhdCFkGCCKLgz2Y2RiQgCiqZzmi3CG4COj0X8ApewSt4Ba%2FQ9leZGpyVG8GComtq3qv3qmeS%2Fw9nikHMd5sVn3bqLx7zom1NcW8z%2F6G9CjoPm722rPEv45EJ21vD0O30AvX12IWDvTRsrPXrnjPlUYO0u3McVpZXhch5cnguZ7vVDWfpjRAZgPqc%2BIMEgKQe9Pfr0xn%2FBqZJjAUNQKilp5cC1gHYYz8Usc3OQsTz9HZWK5BMJwFDwrbWbuIXhfhg%2FDpWuE2mK5lEgQtiz4baU14u3V09i5peiipy6qVAxFWtZiflJiq8AAiIZx1CnxpStGmEpEHDZf4r2pUd%2BMjYxomoxJofo4L%2FHqyR57OF6vEvIkm%2BAYRc%2BWd4P97CAAAAAElFTkSuQmCC" alt="website"></a> <a href="https://www.si13n7.de"><img src="https://img.shields.io/website/https/www.si13n7.de.svg?style=flat&down_color=red&down_message=offline&label=mirror&up_color=limegreen&up_message=online&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEwSURBVDhPxZJNSgNBEIXnCp5AcCO4CmaTRRaKBhdCFkGCCKLgz2Y2RiQgCiqZzmi3CG4COj0X8ApewSt4Ba%2FQ9leZGpyVG8GComtq3qv3qmeS%2Fw9nikHMd5sVn3bqLx7zom1NcW8z%2F6G9CjoPm722rPEv45EJ21vD0O30AvX12IWDvTRsrPXrnjPlUYO0u3McVpZXhch5cnguZ7vVDWfpjRAZgPqc%2BIMEgKQe9Pfr0xn%2FBqZJjAUNQKilp5cC1gHYYz8Usc3OQsTz9HZWK5BMJwFDwrbWbuIXhfhg%2FDpWuE2mK5lEgQtiz4baU14u3V09i5peiipy6qVAxFWtZiflJiq8AAiIZx1CnxpStGmEpEHDZf4r2pUd%2BMjYxomoxJofo4L%2FHqyR57OF6vEvIkm%2BAYRc%2BWd4P97CAAAAAElFTkSuQmCC" alt="mirror"></a></p> |
| 1 | +<p align="center"> |
| 2 | +<a href="https://dotnet.microsoft.com/download/dotnet/5.0" rel="nofollow"><img src="https://img.shields.io/badge/core-v3.1%20%7C%20v5.0-lightgrey.svg?style=flat&logo=.net&logoColor=white" alt="Platform"></a> |
| 3 | +<a href="https://github.com/Roydl/AlphaNumericComparer/actions/workflows/dotnet.yml"><img src="https://github.com/Roydl/AlphaNumericComparer/actions/workflows/dotnet.yml/badge.svg" alt="Build"></a> |
| 4 | +<a href="https://github.com/Roydl/AlphaNumericComparer/commits/master"><img src="https://img.shields.io/github/last-commit/Roydl/AlphaNumericComparer.svg?style=flat&logo=github&logoColor=white" alt="Commits"></a> |
| 5 | +<a href="https://github.com/Roydl/AlphaNumericComparer/blob/master/LICENSE.txt"><img src="https://img.shields.io/github/license/Roydl/AlphaNumericComparer.svg?style=flat" alt="License"></a> |
| 6 | +</p> |
| 7 | +<p align="center"> |
| 8 | +<a href="https://www.nuget.org/packages/Roydl.AlphaNumericComparer" rel="nofollow"><img src="https://img.shields.io/nuget/v/Roydl.AlphaNumericComparer.svg?style=flat&logo=nuget&logoColor=white&label=nuget" alt="NuGet"></a> |
| 9 | +<a href="https://github.com/Roydl/AlphaNumericComparer/archive/master.zip"><img src="https://img.shields.io/badge/download-source-yellow.svg?style=flat" alt="Source"></a> |
| 10 | +<a href="https://www.si13n7.com" rel="nofollow"><img src="https://img.shields.io/website/https/www.si13n7.com.svg?style=flat&down_color=red&down_message=offline&up_color=limegreen&up_message=online&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEwSURBVDhPxZJNSgNBEIXnCp5AcCO4CmaTRRaKBhdCFkGCCKLgz2Y2RiQgCiqZzmi3CG4COj0X8ApewSt4Ba%2FQ9leZGpyVG8GComtq3qv3qmeS%2Fw9nikHMd5sVn3bqLx7zom1NcW8z%2F6G9CjoPm722rPEv45EJ21vD0O30AvX12IWDvTRsrPXrnjPlUYO0u3McVpZXhch5cnguZ7vVDWfpjRAZgPqc%2BIMEgKQe9Pfr0xn%2FBqZJjAUNQKilp5cC1gHYYz8Usc3OQsTz9HZWK5BMJwFDwrbWbuIXhfhg%2FDpWuE2mK5lEgQtiz4baU14u3V09i5peiipy6qVAxFWtZiflJiq8AAiIZx1CnxpStGmEpEHDZf4r2pUd%2BMjYxomoxJofo4L%2FHqyR57OF6vEvIkm%2BAYRc%2BWd4P97CAAAAAElFTkSuQmCC" alt="Website"></a> |
| 11 | +<a href="https://www.si13n7.de" rel="nofollow"><img src="https://img.shields.io/website/https/www.si13n7.de.svg?style=flat&down_color=red&down_message=offline&label=mirror&up_color=limegreen&up_message=online&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEwSURBVDhPxZJNSgNBEIXnCp5AcCO4CmaTRRaKBhdCFkGCCKLgz2Y2RiQgCiqZzmi3CG4COj0X8ApewSt4Ba%2FQ9leZGpyVG8GComtq3qv3qmeS%2Fw9nikHMd5sVn3bqLx7zom1NcW8z%2F6G9CjoPm722rPEv45EJ21vD0O30AvX12IWDvTRsrPXrnjPlUYO0u3McVpZXhch5cnguZ7vVDWfpjRAZgPqc%2BIMEgKQe9Pfr0xn%2FBqZJjAUNQKilp5cC1gHYYz8Usc3OQsTz9HZWK5BMJwFDwrbWbuIXhfhg%2FDpWuE2mK5lEgQtiz4baU14u3V09i5peiipy6qVAxFWtZiflJiq8AAiIZx1CnxpStGmEpEHDZf4r2pUd%2BMjYxomoxJofo4L%2FHqyR57OF6vEvIkm%2BAYRc%2BWd4P97CAAAAAElFTkSuQmCC" alt="Mirror"></a> |
| 12 | +</p> |
2 | 13 |
|
3 | 14 | # Roydl.AlphaNumericComparer |
4 | 15 |
|
5 | | -Type of `IComparer` that enables the alphanumeric comparison of two objects. |
| 16 | +Types of `IComparer` that enables the alphanumeric comparison of two objects. |
| 17 | + |
| 18 | +| Default Comparer | Alphanumeric Comparer | |
| 19 | +| ---- | ---- | |
| 20 | +| Alpha10000 | Alpha111 | |
| 21 | +| Alpha111 | Alpha1150 | |
| 22 | +| Alpha1150 | Alpha10000 | |
| 23 | +| Foxtrot10000 | Foxtrot111 | |
| 24 | +| Foxtrot111 | Foxtrot1150 | |
| 25 | +| Foxtrot1150 | Foxtrot10000 | |
| 26 | +| Oscar10000 | Oscar111 | |
| 27 | +| Oscar111 | Oscar1150 | |
| 28 | +| Oscar1150 | Oscar10000 | |
| 29 | + |
| 30 | + |
| 31 | +#### Usage: |
| 32 | +```cs |
| 33 | +// Can be used in the same way as all `IComparer`. |
| 34 | +var sortedDictionary = new SortedDictionary<string, object>(new AlphaNumericComparer<string>()); |
| 35 | +var sortedList = new SortedList<string, object>(new AlphaNumericComparer<string>()); |
| 36 | +var unsortedCollection = new string[] { /* some strings */ }; |
| 37 | +var sortedCollection = unsorted.OrderBy(str => str, new AlphaNumericComparer<string>()); |
| 38 | + |
| 39 | +// Can even be used to sort `System.Windows.Forms` elements or the like. |
| 40 | +// In case of `System.Windows.Forms.ListView` you just have to set |
| 41 | +// the `ListViewItemSorter` field to automatically sort the list items. |
| 42 | +myListView.ListViewItemSorter = new AlphaNumericComparer(); |
| 43 | +``` |
| 44 | + |
| 45 | +--- |
| 46 | + |
| 47 | + |
| 48 | +## Would you like to help? |
| 49 | + |
| 50 | +- [Star this Project](https://github.com/Roydl/AlphaNumericComparer/stargazers) :star: and show me that this project interests you :hugs: |
| 51 | +- [Open an Issue](https://github.com/Roydl/AlphaNumericComparer/issues/new) :coffee: to give me your feedback and tell me your ideas and wishes for the future :sunglasses: |
| 52 | +- [Open a Ticket](https://support.si13n7.de/) :mailbox: if you don't have a GitHub account, you can contact me directly on my website :wink: |
| 53 | +- [Donate by PayPal](http://donate.si13n7.com/) :money_with_wings: to buy me some cookies :cookie: |
| 54 | + |
0 commit comments