Rhyous.StringLibrary 1.3.0

dotnet add package Rhyous.StringLibrary --version 1.3.0                
NuGet\Install-Package Rhyous.StringLibrary -Version 1.3.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="Rhyous.StringLibrary" Version="1.3.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Rhyous.StringLibrary --version 1.3.0                
#r "nuget: Rhyous.StringLibrary, 1.3.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 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:

  1. Consistent string extension methods between projects
  2. 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.
  3. The same code in .NET Framework and .Net Core/.NET standard.

What is in this library?

  1. String Capitalization extension methods - https://github.com/rhyous/StringLibrary/blob/master/src/Rhyous.StringLibrary.Shared/Capitalization/StringCapitalizationExtensions.cs You can capitalize things easily.

  2. 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.

  3. 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.

  1. 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.

  2. 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.

  3. 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

  4. 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.

  5. A crypto random string generator https://github.com/rhyous/StringLibrary/blob/master/src/Rhyous.StringLibrary.Shared/Random/CryptoRandomString.cs

  6. 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.

  1. 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:

  1. You don't have to reinvent the entire wheel, you can simply improve and existing wheel.
  2. You can use the code anywhere, anytime as it is delivered as a public NuGet package.
  3. You can get this code in both .NET Framework and .NET Core or Standard.
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)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .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,380 3/5/2024
1.2.43 13,033 9/30/2021
1.2.39 902 9/22/2021
1.2.30 1,928 1/31/2020
1.2.17 16,894 1/20/2020
1.2.13 4,729 12/5/2019
1.2.12 882 12/5/2019
1.2.11 892 12/5/2019
1.2.10 923 12/5/2019
1.2.4 890 12/5/2019
1.2.2 1,642 12/4/2019
1.2.1 934 11/11/2019
1.1.12 2,838 4/13/2019
1.1.11 1,018 3/16/2019
1.1.10 999 3/15/2019
1.1.9 1,139 12/31/2018
1.1.8 1,173 11/20/2018
1.1.7 1,180 10/24/2018
1.1.6 1,325 7/20/2018
1.1.5 1,475 5/14/2018
1.1.4 1,367 5/10/2018
1.1.2 1,398 3/14/2018
1.1.1 1,467 3/4/2018
1.1.0 1,438 9/19/2017
1.0.9 1,227 9/18/2017
1.0.7 1,293 9/18/2017
1.0.5 1,411 2/1/2017
1.0.4 1,387 12/30/2016
1.0.3 1,290 12/14/2016
1.0.2 1,364 9/30/2016
1.0.1 1,714 9/24/2016
1.0.0 1,449 9/22/2016