From b4d87e53a00e76c8fcf2e0a0744554d91eb1db34 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 2 Dec 2025 08:15:48 -0500 Subject: [PATCH] Try out split libraries in the same repo --- README.MD | 121 +----------------- SabreTools.IO.sln | 54 +++++++- SabreTools.IO/README.MD | 99 ++++++++++++++ SabreTools.IO/SabreTools.IO.csproj | 5 + .../BothEndian.cs | 0 .../BothInt16.cs | 0 .../BothInt32.cs | 0 .../BothInt64.cs | 0 .../BothInt8.cs | 0 .../BothUInt16.cs | 0 .../BothUInt32.cs | 0 .../BothUInt64.cs | 0 .../BothUInt8.cs | 0 SabreTools.Numerics/README.MD | 20 +++ .../SabreTools.Numerics.csproj | 36 ++++++ .../Compare/NaturalComparer.cs | 0 .../Compare/NaturalComparerUtil.cs | 0 .../Compare/NaturalReversedComparer.cs | 0 SabreTools.Text/README.MD | 14 ++ SabreTools.Text/SabreTools.Text.csproj | 36 ++++++ 20 files changed, 262 insertions(+), 123 deletions(-) create mode 100644 SabreTools.IO/README.MD rename {SabreTools.IO/Numerics => SabreTools.Numerics}/BothEndian.cs (100%) rename {SabreTools.IO/Numerics => SabreTools.Numerics}/BothInt16.cs (100%) rename {SabreTools.IO/Numerics => SabreTools.Numerics}/BothInt32.cs (100%) rename {SabreTools.IO/Numerics => SabreTools.Numerics}/BothInt64.cs (100%) rename {SabreTools.IO/Numerics => SabreTools.Numerics}/BothInt8.cs (100%) rename {SabreTools.IO/Numerics => SabreTools.Numerics}/BothUInt16.cs (100%) rename {SabreTools.IO/Numerics => SabreTools.Numerics}/BothUInt32.cs (100%) rename {SabreTools.IO/Numerics => SabreTools.Numerics}/BothUInt64.cs (100%) rename {SabreTools.IO/Numerics => SabreTools.Numerics}/BothUInt8.cs (100%) create mode 100644 SabreTools.Numerics/README.MD create mode 100644 SabreTools.Numerics/SabreTools.Numerics.csproj rename {SabreTools.IO => SabreTools.Text}/Compare/NaturalComparer.cs (100%) rename {SabreTools.IO => SabreTools.Text}/Compare/NaturalComparerUtil.cs (100%) rename {SabreTools.IO => SabreTools.Text}/Compare/NaturalReversedComparer.cs (100%) create mode 100644 SabreTools.Text/README.MD create mode 100644 SabreTools.Text/SabreTools.Text.csproj diff --git a/README.MD b/README.MD index 25c2fb9..e3c341d 100644 --- a/README.MD +++ b/README.MD @@ -2,126 +2,7 @@ [![Build and Test](https://github.com/SabreTools/SabreTools.IO/actions/workflows/build_and_test.yml/badge.svg)](https://github.com/SabreTools/SabreTools.IO/actions/workflows/build_and_test.yml) -This library compries of I/O functionality used by other SabreTools projects. - -Find the link to the Nuget package [here](https://www.nuget.org/packages/SabreTools.IO). - -## Namespaces - -Below are a list of the included namespaces and their overall utility. - -### `SabreTools.IO` - -Generic helper classes that involve custom functionality and utility. - -### `SabreTools.IO.Compression` - -Various compression implementations that are used across multiple projects. Most of the implementations are be ports of existing C and C++ code. - -#### Supported Compressions - -| Compression Name | Decompress | Compress | Notes | -| --- | --- | --- | --- | -| Blast | Yes | No | | -| BZip2 | Yes | Yes | Sourced from DotNetZip | -| Deflate | Yes | Yes | Sourced from DotNetZip | -| LZ | Yes | No | KWAJ, QBasic 4.5, and SZDD variants; KWAJ incomplete | -| LZX | No | No | | -| MSZIP | Yes | No | | -| Quantum | Yes* | No | Partial implementation based on standalone archives; not working | - -**Note:** If something is marked with a `*` it means that it need testing. - -#### External Libraries - -| Library Name | Use | -| --- | ---| -| [DotNetZip](https://github.com/DinoChiesa/DotNetZip) | BZip2 and DEFLATE implementations; minor edits have been made | -| [ZLibPort](https://github.com/Nanook/zlib-C-To-CSharp-Port) | Adds zlib code for internal and external use; minor edits have been made | - -### `SabreTools.IO.Encryption` - -Various encryption implementations that are used across multiple projects. Most of the implementations are be ports of existing C and C++ code. - -#### Supported Encryption Schemes - -| Encryption Scheme | Encrypt | Decrypt | Notes | -| --- | --- | --- | --- | -| AES/CTR | Yes | Yes | Subset of functionality exposed from [The Bouncy Castle Cryptography Library For .NET](https://github.com/bcgit/bc-csharp) | -| MoPaQ | No | Yes | Used to encrypt and decrypt MoPaQ tables for processing | - -### `SabreTools.IO.Extensions` - -Extensions for `BinaryReader`, `byte[]`, and `Stream` to help with reading and writing various data types. Some data types are locked behind .NET version support. - -This namespace also contains other various extensions that help with common functionality and safe access. - -### `SabreTools.IO.Interfaces` - -Common interfaces used mainly internal to the library. - -| Interface | Notes | -| --- | --- | -| `IMatch` | Represents a matcher for a generic type | -| `IMatchSet` | Represents a set of `IMatch` types | - -### `SabreTools.IO.Logging` - -Logic for a logging system, including writing to console and textfile outputs. There are 4 possible log levels for logging statements to be invoked with. There is also a stopwatch implementation included for logging statements with automatic timespan tracking. - -### `SabreTools.IO.Matching` - -Classes designed to make matching contents and paths easier. These classes allow for both grouped and single matching as well as post-processing of matched information. - -### `SabreTools.IO.Readers` and `SabreTools.IO.Writers` - -Reading and writing support for the following file types: - -- ClrMamePro-derived Metadata files -- Standard and non-standard INI files -- Separated-Value files (e.g. CSV, SSV, TSV) - -For a generic INI implementation, see `SabreTools.IO.IniFile`. - -### `SabreTools.IO.Streams` - -Custom `Stream` implementations that are required for specialized use: - -- `BufferedStream`: A format that is not a true stream implementation used for buffered, single-byte reads -- `ReadOnlyBitStream`: A readonly stream implementation allowing bitwise reading -- `ReadOnlyCompositeStream`: A readonly stream implementation that wraps multiple source streams in a set order -- `ViewStream`: A readonly stream implementation representing a view into source data - -### `SabreTools.IO.Transform` - -File and stream implementations of common data transformations: - -- Combine using either ordered concatenation or interleaving -- Split by even/odd chunks or based on block size -- Convert data either by bit-swapping, byte-swapping, word-swapping, or word/byte-swapping - -### `SabreTools.Numerics` - -Custom numeric types and related functionality. - -#### Supported Numeric Types - -| Type Name | Description | -| --- | --- | -| `BothInt8` | Both-endian `Int8` value | -| `BothUInt8` | Both-endian `UInt8` value | -| `BothInt16` | Both-endian `Int16` value | -| `BothUInt16` | Both-endian `UInt16` value | -| `BothInt32` | Both-endian `Int32` value | -| `BothUInt32` | Both-endian `UInt32` value | -| `BothInt64` | Both-endian `Int64` value | -| `BothUInt64` | Both-endian `UInt64` value | - -**Both-endian** or **bi-endian** numbers are represented by a little-endian value followed by a big-endian value, where both values are the same number. - -### `SabreTools.Text.Compare` - -Classes focused on string comparison by natural sorting. For example, "5" would be sorted before "100". +This set of libraries enable special I/O-focused functionality used by other SabreTools projects. See the README files in each project directory for more details. ## Releases diff --git a/SabreTools.IO.sln b/SabreTools.IO.sln index e1a8cf8..0743223 100644 --- a/SabreTools.IO.sln +++ b/SabreTools.IO.sln @@ -7,22 +7,70 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.IO", "SabreTools EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.IO.Test", "SabreTools.IO.Test\SabreTools.IO.Test.csproj", "{A9767735-5042-48A1-849C-96035DB1DD53}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.Text", "SabreTools.Text\SabreTools.Text.csproj", "{EC8FD8AD-579F-4B8B-A65E-119E5294ADC1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.Numerics", "SabreTools.Numerics\SabreTools.Numerics.csproj", "{565EAC34-B533-4C5C-9B81-77AE4B33A027}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {87CE4411-80D9-49FF-894C-761F1C20D9A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {87CE4411-80D9-49FF-894C-761F1C20D9A5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87CE4411-80D9-49FF-894C-761F1C20D9A5}.Debug|x64.ActiveCfg = Debug|Any CPU + {87CE4411-80D9-49FF-894C-761F1C20D9A5}.Debug|x64.Build.0 = Debug|Any CPU + {87CE4411-80D9-49FF-894C-761F1C20D9A5}.Debug|x86.ActiveCfg = Debug|Any CPU + {87CE4411-80D9-49FF-894C-761F1C20D9A5}.Debug|x86.Build.0 = Debug|Any CPU {87CE4411-80D9-49FF-894C-761F1C20D9A5}.Release|Any CPU.ActiveCfg = Release|Any CPU {87CE4411-80D9-49FF-894C-761F1C20D9A5}.Release|Any CPU.Build.0 = Release|Any CPU + {87CE4411-80D9-49FF-894C-761F1C20D9A5}.Release|x64.ActiveCfg = Release|Any CPU + {87CE4411-80D9-49FF-894C-761F1C20D9A5}.Release|x64.Build.0 = Release|Any CPU + {87CE4411-80D9-49FF-894C-761F1C20D9A5}.Release|x86.ActiveCfg = Release|Any CPU + {87CE4411-80D9-49FF-894C-761F1C20D9A5}.Release|x86.Build.0 = Release|Any CPU {A9767735-5042-48A1-849C-96035DB1DD53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A9767735-5042-48A1-849C-96035DB1DD53}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A9767735-5042-48A1-849C-96035DB1DD53}.Debug|x64.ActiveCfg = Debug|Any CPU + {A9767735-5042-48A1-849C-96035DB1DD53}.Debug|x64.Build.0 = Debug|Any CPU + {A9767735-5042-48A1-849C-96035DB1DD53}.Debug|x86.ActiveCfg = Debug|Any CPU + {A9767735-5042-48A1-849C-96035DB1DD53}.Debug|x86.Build.0 = Debug|Any CPU {A9767735-5042-48A1-849C-96035DB1DD53}.Release|Any CPU.ActiveCfg = Release|Any CPU {A9767735-5042-48A1-849C-96035DB1DD53}.Release|Any CPU.Build.0 = Release|Any CPU + {A9767735-5042-48A1-849C-96035DB1DD53}.Release|x64.ActiveCfg = Release|Any CPU + {A9767735-5042-48A1-849C-96035DB1DD53}.Release|x64.Build.0 = Release|Any CPU + {A9767735-5042-48A1-849C-96035DB1DD53}.Release|x86.ActiveCfg = Release|Any CPU + {A9767735-5042-48A1-849C-96035DB1DD53}.Release|x86.Build.0 = Release|Any CPU + {EC8FD8AD-579F-4B8B-A65E-119E5294ADC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC8FD8AD-579F-4B8B-A65E-119E5294ADC1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC8FD8AD-579F-4B8B-A65E-119E5294ADC1}.Debug|x64.ActiveCfg = Debug|Any CPU + {EC8FD8AD-579F-4B8B-A65E-119E5294ADC1}.Debug|x64.Build.0 = Debug|Any CPU + {EC8FD8AD-579F-4B8B-A65E-119E5294ADC1}.Debug|x86.ActiveCfg = Debug|Any CPU + {EC8FD8AD-579F-4B8B-A65E-119E5294ADC1}.Debug|x86.Build.0 = Debug|Any CPU + {EC8FD8AD-579F-4B8B-A65E-119E5294ADC1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC8FD8AD-579F-4B8B-A65E-119E5294ADC1}.Release|Any CPU.Build.0 = Release|Any CPU + {EC8FD8AD-579F-4B8B-A65E-119E5294ADC1}.Release|x64.ActiveCfg = Release|Any CPU + {EC8FD8AD-579F-4B8B-A65E-119E5294ADC1}.Release|x64.Build.0 = Release|Any CPU + {EC8FD8AD-579F-4B8B-A65E-119E5294ADC1}.Release|x86.ActiveCfg = Release|Any CPU + {EC8FD8AD-579F-4B8B-A65E-119E5294ADC1}.Release|x86.Build.0 = Release|Any CPU + {565EAC34-B533-4C5C-9B81-77AE4B33A027}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {565EAC34-B533-4C5C-9B81-77AE4B33A027}.Debug|Any CPU.Build.0 = Debug|Any CPU + {565EAC34-B533-4C5C-9B81-77AE4B33A027}.Debug|x64.ActiveCfg = Debug|Any CPU + {565EAC34-B533-4C5C-9B81-77AE4B33A027}.Debug|x64.Build.0 = Debug|Any CPU + {565EAC34-B533-4C5C-9B81-77AE4B33A027}.Debug|x86.ActiveCfg = Debug|Any CPU + {565EAC34-B533-4C5C-9B81-77AE4B33A027}.Debug|x86.Build.0 = Debug|Any CPU + {565EAC34-B533-4C5C-9B81-77AE4B33A027}.Release|Any CPU.ActiveCfg = Release|Any CPU + {565EAC34-B533-4C5C-9B81-77AE4B33A027}.Release|Any CPU.Build.0 = Release|Any CPU + {565EAC34-B533-4C5C-9B81-77AE4B33A027}.Release|x64.ActiveCfg = Release|Any CPU + {565EAC34-B533-4C5C-9B81-77AE4B33A027}.Release|x64.Build.0 = Release|Any CPU + {565EAC34-B533-4C5C-9B81-77AE4B33A027}.Release|x86.ActiveCfg = Release|Any CPU + {565EAC34-B533-4C5C-9B81-77AE4B33A027}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection EndGlobal diff --git a/SabreTools.IO/README.MD b/SabreTools.IO/README.MD new file mode 100644 index 0000000..cd78d4c --- /dev/null +++ b/SabreTools.IO/README.MD @@ -0,0 +1,99 @@ +# SabreTools.IO + +This library comprises of I/O functionality used by other SabreTools projects. + +Find the link to the Nuget package [here](https://www.nuget.org/packages/SabreTools.IO). + +## Namespaces + +Below are a list of the included namespaces and their overall utility. + +### `SabreTools.IO` + +Generic helper classes that involve custom functionality and utility. + +### `SabreTools.IO.Compression` + +Various compression implementations that are used across multiple projects. Most of the implementations are be ports of existing C and C++ code. + +#### Supported Compressions + +| Compression Name | Decompress | Compress | Notes | +| --- | --- | --- | --- | +| Blast | Yes | No | | +| BZip2 | Yes | Yes | Sourced from DotNetZip | +| Deflate | Yes | Yes | Sourced from DotNetZip | +| LZ | Yes | No | KWAJ, QBasic 4.5, and SZDD variants; KWAJ incomplete | +| LZX | No | No | | +| MSZIP | Yes | No | | +| Quantum | Yes* | No | Partial implementation based on standalone archives; not working | + +**Note:** If something is marked with a `*` it means that it need testing. + +#### External Libraries + +| Library Name | Use | +| --- | ---| +| [DotNetZip](https://github.com/DinoChiesa/DotNetZip) | BZip2 and DEFLATE implementations; minor edits have been made | +| [ZLibPort](https://github.com/Nanook/zlib-C-To-CSharp-Port) | Adds zlib code for internal and external use; minor edits have been made | + +### `SabreTools.IO.Encryption` + +Various encryption implementations that are used across multiple projects. Most of the implementations are be ports of existing C and C++ code. + +#### Supported Encryption Schemes + +| Encryption Scheme | Encrypt | Decrypt | Notes | +| --- | --- | --- | --- | +| AES/CTR | Yes | Yes | Subset of functionality exposed from [The Bouncy Castle Cryptography Library For .NET](https://github.com/bcgit/bc-csharp) | +| MoPaQ | No | Yes | Used to encrypt and decrypt MoPaQ tables for processing | + +### `SabreTools.IO.Extensions` + +Extensions for `BinaryReader`, `byte[]`, and `Stream` to help with reading and writing various data types. Some data types are locked behind .NET version support. + +This namespace also contains other various extensions that help with common functionality and safe access. + +### `SabreTools.IO.Interfaces` + +Common interfaces used mainly internal to the library. + +| Interface | Notes | +| --- | --- | +| `IMatch` | Represents a matcher for a generic type | +| `IMatchSet` | Represents a set of `IMatch` types | + +### `SabreTools.IO.Logging` + +Logic for a logging system, including writing to console and textfile outputs. There are 4 possible log levels for logging statements to be invoked with. There is also a stopwatch implementation included for logging statements with automatic timespan tracking. + +### `SabreTools.IO.Matching` + +Classes designed to make matching contents and paths easier. These classes allow for both grouped and single matching as well as post-processing of matched information. + +### `SabreTools.IO.Readers` and `SabreTools.IO.Writers` + +Reading and writing support for the following file types: + +- ClrMamePro-derived Metadata files +- Standard and non-standard INI files +- Separated-Value files (e.g. CSV, SSV, TSV) + +For a generic INI implementation, see `SabreTools.IO.IniFile`. + +### `SabreTools.IO.Streams` + +Custom `Stream` implementations that are required for specialized use: + +- `BufferedStream`: A format that is not a true stream implementation used for buffered, single-byte reads +- `ReadOnlyBitStream`: A readonly stream implementation allowing bitwise reading +- `ReadOnlyCompositeStream`: A readonly stream implementation that wraps multiple source streams in a set order +- `ViewStream`: A readonly stream implementation representing a view into source data + +### `SabreTools.IO.Transform` + +File and stream implementations of common data transformations: + +- Combine using either ordered concatenation or interleaving +- Split by even/odd chunks or based on block size +- Convert data either by bit-swapping, byte-swapping, word-swapping, or word/byte-swapping diff --git a/SabreTools.IO/SabreTools.IO.csproj b/SabreTools.IO/SabreTools.IO.csproj index 11a077c..f018d98 100644 --- a/SabreTools.IO/SabreTools.IO.csproj +++ b/SabreTools.IO/SabreTools.IO.csproj @@ -33,6 +33,11 @@ + + + + + diff --git a/SabreTools.IO/Numerics/BothEndian.cs b/SabreTools.Numerics/BothEndian.cs similarity index 100% rename from SabreTools.IO/Numerics/BothEndian.cs rename to SabreTools.Numerics/BothEndian.cs diff --git a/SabreTools.IO/Numerics/BothInt16.cs b/SabreTools.Numerics/BothInt16.cs similarity index 100% rename from SabreTools.IO/Numerics/BothInt16.cs rename to SabreTools.Numerics/BothInt16.cs diff --git a/SabreTools.IO/Numerics/BothInt32.cs b/SabreTools.Numerics/BothInt32.cs similarity index 100% rename from SabreTools.IO/Numerics/BothInt32.cs rename to SabreTools.Numerics/BothInt32.cs diff --git a/SabreTools.IO/Numerics/BothInt64.cs b/SabreTools.Numerics/BothInt64.cs similarity index 100% rename from SabreTools.IO/Numerics/BothInt64.cs rename to SabreTools.Numerics/BothInt64.cs diff --git a/SabreTools.IO/Numerics/BothInt8.cs b/SabreTools.Numerics/BothInt8.cs similarity index 100% rename from SabreTools.IO/Numerics/BothInt8.cs rename to SabreTools.Numerics/BothInt8.cs diff --git a/SabreTools.IO/Numerics/BothUInt16.cs b/SabreTools.Numerics/BothUInt16.cs similarity index 100% rename from SabreTools.IO/Numerics/BothUInt16.cs rename to SabreTools.Numerics/BothUInt16.cs diff --git a/SabreTools.IO/Numerics/BothUInt32.cs b/SabreTools.Numerics/BothUInt32.cs similarity index 100% rename from SabreTools.IO/Numerics/BothUInt32.cs rename to SabreTools.Numerics/BothUInt32.cs diff --git a/SabreTools.IO/Numerics/BothUInt64.cs b/SabreTools.Numerics/BothUInt64.cs similarity index 100% rename from SabreTools.IO/Numerics/BothUInt64.cs rename to SabreTools.Numerics/BothUInt64.cs diff --git a/SabreTools.IO/Numerics/BothUInt8.cs b/SabreTools.Numerics/BothUInt8.cs similarity index 100% rename from SabreTools.IO/Numerics/BothUInt8.cs rename to SabreTools.Numerics/BothUInt8.cs diff --git a/SabreTools.Numerics/README.MD b/SabreTools.Numerics/README.MD new file mode 100644 index 0000000..9a20243 --- /dev/null +++ b/SabreTools.Numerics/README.MD @@ -0,0 +1,20 @@ +# SabreTools.Numerics + +This library comprises of custom numeric types used by other SabreTools projects. + +Find the link to the Nuget package [here](https://www.nuget.org/packages/SabreTools.Numerics). + +## Supported Numeric Types + +| Type Name | Description | +| --- | --- | +| `BothInt8` | Both-endian `Int8` value | +| `BothUInt8` | Both-endian `UInt8` value | +| `BothInt16` | Both-endian `Int16` value | +| `BothUInt16` | Both-endian `UInt16` value | +| `BothInt32` | Both-endian `Int32` value | +| `BothUInt32` | Both-endian `UInt32` value | +| `BothInt64` | Both-endian `Int64` value | +| `BothUInt64` | Both-endian `UInt64` value | + +**Both-endian** or **bi-endian** numbers are represented by a little-endian value followed by a big-endian value, where both values are the same number. diff --git a/SabreTools.Numerics/SabreTools.Numerics.csproj b/SabreTools.Numerics/SabreTools.Numerics.csproj new file mode 100644 index 0000000..997c565 --- /dev/null +++ b/SabreTools.Numerics/SabreTools.Numerics.csproj @@ -0,0 +1,36 @@ + + + + + net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0;net10.0;netstandard2.0;netstandard2.1 + true + true + latest + CS0618 + enable + true + snupkg + true + 1.9.0 + + + Matt Nadareski + Common numeric types by other SabreTools projects + Copyright (c) Matt Nadareski 2019-2025 + https://github.com/SabreTools/ + README.md + https://github.com/SabreTools/SabreTools.IO + git + both-endian numeric type signed unsigned + MIT + + + + + + + + + + + \ No newline at end of file diff --git a/SabreTools.IO/Compare/NaturalComparer.cs b/SabreTools.Text/Compare/NaturalComparer.cs similarity index 100% rename from SabreTools.IO/Compare/NaturalComparer.cs rename to SabreTools.Text/Compare/NaturalComparer.cs diff --git a/SabreTools.IO/Compare/NaturalComparerUtil.cs b/SabreTools.Text/Compare/NaturalComparerUtil.cs similarity index 100% rename from SabreTools.IO/Compare/NaturalComparerUtil.cs rename to SabreTools.Text/Compare/NaturalComparerUtil.cs diff --git a/SabreTools.IO/Compare/NaturalReversedComparer.cs b/SabreTools.Text/Compare/NaturalReversedComparer.cs similarity index 100% rename from SabreTools.IO/Compare/NaturalReversedComparer.cs rename to SabreTools.Text/Compare/NaturalReversedComparer.cs diff --git a/SabreTools.Text/README.MD b/SabreTools.Text/README.MD new file mode 100644 index 0000000..1b2722d --- /dev/null +++ b/SabreTools.Text/README.MD @@ -0,0 +1,14 @@ +# SabreTools.Text + +This library comprises of text functionality used by other SabreTools projects. + +Find the link to the Nuget package [here](https://www.nuget.org/packages/SabreTools.Text). + +## `SabreTools.Text.Compare` + +Classes focused on string comparison by natural sorting. For example, "5" would be sorted before "100". + +| Class | Description | +| --- | --- | +| `NaturalComparer` | Orders string inputs from lowest to highest value, if applicable | +| `NaturalReversedComparer` | Orders string inputs from highest to lowest value, if applicable | diff --git a/SabreTools.Text/SabreTools.Text.csproj b/SabreTools.Text/SabreTools.Text.csproj new file mode 100644 index 0000000..d1ecedd --- /dev/null +++ b/SabreTools.Text/SabreTools.Text.csproj @@ -0,0 +1,36 @@ + + + + + net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0;net10.0;netstandard2.0;netstandard2.1 + true + true + latest + CS0618 + enable + true + snupkg + true + 1.9.0 + + + Matt Nadareski + Common text utilities by other SabreTools projects + Copyright (c) Matt Nadareski 2019-2025 + https://github.com/SabreTools/ + README.md + https://github.com/SabreTools/SabreTools.IO + git + text-comparison comparison text + MIT + + + + + + + + + + + \ No newline at end of file