Gihan.Helpers.StringHelper.NaturalStringComparer 1.5.0

Suggested Alternatives

GihanSoft.String.NaturalComparer

Additional Details

package id changed

There is a newer version of this package available.
See the version list below for details.
dotnet add package Gihan.Helpers.StringHelper.NaturalStringComparer --version 1.5.0
NuGet\Install-Package Gihan.Helpers.StringHelper.NaturalStringComparer -Version 1.5.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Gihan.Helpers.StringHelper.NaturalStringComparer" Version="1.5.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Gihan.Helpers.StringHelper.NaturalStringComparer --version 1.5.0
#r "nuget: Gihan.Helpers.StringHelper.NaturalStringComparer, 1.5.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Gihan.Helpers.StringHelper.NaturalStringComparer as a Cake Addin
#addin nuget:?package=Gihan.Helpers.StringHelper.NaturalStringComparer&version=1.5.0

// Install Gihan.Helpers.StringHelper.NaturalStringComparer as a Cake Tool
#tool nuget:?package=Gihan.Helpers.StringHelper.NaturalStringComparer&version=1.5.0

NaturalStringComparer

Build status

Pure C# code<br/> Usable in .net core and .net framework. No need to windows api.<br/> written int .net standard

Comparer to sort strings by numbers in them (as windows explorer do).<br/> This is an easy to use and useful little library for programs that want to sort string naturaly by numbers.<br/> you know 2 is lower than 11 but C# default string comparer not know this or not like this.<br/> so you may like to use my lib for a human friendly string comparing and sorting.<br/>

var stringList = new List<string>
            {
                "number1", "number2", "number3", "number4", "number10", "number15", "number22", "number26"
                , "number9", "number33", "number5", "number12"
            };
stringList.Sort(NaturalStringComparer.Default);
Console.WriteLine("Natural Sort:");
foreach(var item in stringList)
{
  Console.WriteLine(item);
}
stringList.Sort();
Console.WriteLine();
Console.WriteLine("Normal Sort:");
foreach(var item in stringList)
{
  Console.WriteLine(item);
}
/* output
Natural Sort:
number1
number2
number3
number4
number5
number9
number10
number12
number15
number22
number26
number33

Normal Sort:
number1
number10
number12
number15
number2
number22
number26
number3
number33
number4
number5
number9
*/
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Gihan.Helpers.StringHelper.NaturalStringComparer:

Package Downloads
Gihan.Storage.Core

Gihan Base interfaces for use multiplatform.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.8.0 664 10/23/2020
1.7.1 432 10/19/2020
1.6.0 974 5/11/2019
1.5.2 1,406 5/3/2019
1.5.1 623 3/29/2019
1.5.0 649 3/8/2019
1.4.0 1,301 11/11/2018
1.3.4 1,521 9/19/2018
1.3.1 752 9/19/2018
1.3.0 1,153 8/9/2018
1.2.0 834 8/8/2018

nothing changed but implementation