Gihan.Helpers.StringHelper.NaturalStringComparer
1.5.0
GihanSoft.String.NaturalComparer
Additional Detailspackage id changed
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
<PackageReference Include="Gihan.Helpers.StringHelper.NaturalStringComparer" Version="1.5.0" />
paket add Gihan.Helpers.StringHelper.NaturalStringComparer --version 1.5.0
#r "nuget: Gihan.Helpers.StringHelper.NaturalStringComparer, 1.5.0"
// 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
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 | Versions 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. |
-
.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.
nothing changed but implementation