Rhyous.StringLibrary
1.3.0
dotnet add package Rhyous.StringLibrary --version 1.3.0
NuGet\Install-Package Rhyous.StringLibrary -Version 1.3.0
<PackageReference Include="Rhyous.StringLibrary" Version="1.3.0" />
paket add Rhyous.StringLibrary --version 1.3.0
#r "nuget: Rhyous.StringLibrary, 1.3.0"
// Install Rhyous.StringLibrary as a Cake Addin #addin nuget:?package=Rhyous.StringLibrary&version=1.3.0 // Install Rhyous.StringLibrary as a Cake Tool #tool nuget:?package=Rhyous.StringLibrary&version=1.3.0
StringLibrary
A library to make common string functions easier, such as trimming, wrapping, pluralizing, and much more.
Why you should use this library
It will save you time. Yes, you can write your own string extension methods, but you also have to write unit tests for them. This library is fully unit tested so you can include it and move on.
You get:
- Consistent string extension methods between projects
- Faster time to code, as you don't have to roll your own extension methods and then either lack code coverage or have to unit test them.
- The same code in .NET Framework and .Net Core/.NET standard.
What is in this library?
String Capitalization extension methods - https://github.com/rhyous/StringLibrary/blob/master/src/Rhyous.StringLibrary.Shared/Capitalization/StringCapitalizationExtensions.cs You can capitalize things easily.
String Comparison extension methods - https://github.com/rhyous/StringLibrary/blob/master/src/Rhyous.StringLibrary.Shared/Comparison/StringComparisonExtensions.cs This has the contains with the ability to ignore case, that is just missing form .Net.
String Conversion extension methods To Primitives https://github.com/rhyous/StringLibrary/blob/master/src/Rhyous.StringLibrary.Shared/Convers ion/PrimitiveStringExtensions.cs Easily convert strings to and from primitives, with the option for a default value if the string conversion fails.
To Stream https://github.com/rhyous/StringLibrary/blob/master/src/Rhyous.StringLibrary.Shared/Conversion/StreamStringExtensions.cs Easily convert to and from a Stream.
To enum https://github.com/rhyous/StringLibrary/blob/master/src/Rhyous.StringLibrary.Shared/Enum/StringEnumExtensions.cs Easily convert to and from an enum.
AllowedString https://github.com/rhyous/StringLibrary/blob/master/src/Rhyous.StringLibrary.Shared/Enum/AllowedString.cs A class that is a wrapper to a string and allows for you to define a list of allowed strings.
String to Expression extensions: https://github.com/rhyous/StringLibrary/blob/master/src/Rhyous.StringLibrary.Shared/Expression/PropertyNameLambdaExtensions.cs This is pretty cool. If you have a property name and want to convert it to an Expression, you can do so.
Remove Diacritics from a string: https://github.com/rhyous/StringLibrary/blob/master/src/Rhyous.StringLibrary.Shared/Globalization/GlobalizationStringExtensions.cs This allows you to create dictionaries
A pluralization library. https://github.com/rhyous/StringLibrary/tree/master/src/Rhyous.StringLibrary.Shared/Pluralization This makes it easy to do pluralization, include custom pluralization. If a word is missing, it is pretty easy to add to this library.
A crypto random string generator https://github.com/rhyous/StringLibrary/blob/master/src/Rhyous.StringLibrary.Shared/Random/CryptoRandomString.cs
Enhanced trimming abilities https://github.com/rhyous/StringLibrary/tree/master/src/Rhyous.StringLibrary.Shared/Trim The ability to trim all strings inside a complex object, which can and will trim nested complex objects as well. This is very useful for apis and inputs.
Have you heard of The Oft Forgotten Middle Trim, you can trim left and right and middle, with the TrimAll() extension method.
- String wrapping extensions. https://github.com/rhyous/StringLibrary/tree/master/src/Rhyous.StringLibrary.Shared/Wrap Easily quote strings or wrap them in brackets or parentheses or xml tags.
Why you should contribute to this library
This project is very easy to contribute to. If you have a string extension or something you do with strings often, others probably will do the same. Having a common place for stable unit tests code is important.
Why contribute:
- You don't have to reinvent the entire wheel, you can simply improve and existing wheel.
- You can use the code anywhere, anytime as it is delivered as a public NuGet package.
- You can get this code in both .NET Framework and .NET Core or Standard.
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 (3)
Showing the top 3 NuGet packages that depend on Rhyous.StringLibrary:
Package | Downloads |
---|---|
Rhyous.Odata
A library to aid in meeting the odata specification. |
|
Rhyous.EasyCsv
A library to make creating and reading csv easy as well as serializing and deserializing to and from csv. |
|
Rhyous.SimpleArgs
Quickly handle command line arguments. This NuGet package adds an example arguments handler class, where you describe your arguments using a simple poco objects. All the boilerplate code to create the usage message is done for you. You can take action on set or after all arguments are set. This NuGet pakage is source only, great for single file executables. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.3.0 | 1,802 | 3/5/2024 |
1.2.43 | 13,187 | 9/30/2021 |
1.2.39 | 911 | 9/22/2021 |
1.2.30 | 1,936 | 1/31/2020 |
1.2.17 | 16,905 | 1/20/2020 |
1.2.13 | 4,737 | 12/5/2019 |
1.2.12 | 890 | 12/5/2019 |
1.2.11 | 902 | 12/5/2019 |
1.2.10 | 931 | 12/5/2019 |
1.2.4 | 898 | 12/5/2019 |
1.2.2 | 1,650 | 12/4/2019 |
1.2.1 | 942 | 11/11/2019 |
1.1.12 | 2,848 | 4/13/2019 |
1.1.11 | 1,028 | 3/16/2019 |
1.1.10 | 1,008 | 3/15/2019 |
1.1.9 | 1,147 | 12/31/2018 |
1.1.8 | 1,185 | 11/20/2018 |
1.1.7 | 1,194 | 10/24/2018 |
1.1.6 | 1,337 | 7/20/2018 |
1.1.5 | 1,489 | 5/14/2018 |
1.1.4 | 1,379 | 5/10/2018 |
1.1.2 | 1,410 | 3/14/2018 |
1.1.1 | 1,481 | 3/4/2018 |
1.1.0 | 1,451 | 9/19/2017 |
1.0.9 | 1,239 | 9/18/2017 |
1.0.7 | 1,305 | 9/18/2017 |
1.0.5 | 1,424 | 2/1/2017 |
1.0.4 | 1,398 | 12/30/2016 |
1.0.3 | 1,301 | 12/14/2016 |
1.0.2 | 1,380 | 9/30/2016 |
1.0.1 | 1,727 | 9/24/2016 |
1.0.0 | 1,460 | 9/22/2016 |