IvanStoychev.StringExtensions 2.0.0-RC-14Jun2021

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
Suggested Alternatives

IvanStoychev.Useful.String.Extensions

Additional Details

Thank you for using my package!

Unfortunately, the package's name had to be changed and will be published from now on as "Ivan Stoychev's String Extensions" with ID "IvanStoychev.Useful.String.Extensions". That package has much more useful features and functionality.

This is a prerelease version of IvanStoychev.StringExtensions.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package IvanStoychev.StringExtensions --version 2.0.0-RC-14Jun2021
NuGet\Install-Package IvanStoychev.StringExtensions -Version 2.0.0-RC-14Jun2021
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="IvanStoychev.StringExtensions" Version="2.0.0-RC-14Jun2021" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add IvanStoychev.StringExtensions --version 2.0.0-RC-14Jun2021
#r "nuget: IvanStoychev.StringExtensions, 2.0.0-RC-14Jun2021"
#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 IvanStoychev.StringExtensions as a Cake Addin
#addin nuget:?package=IvanStoychev.StringExtensions&version=2.0.0-RC-14Jun2021&prerelease

// Install IvanStoychev.StringExtensions as a Cake Tool
#tool nuget:?package=IvanStoychev.StringExtensions&version=2.0.0-RC-14Jun2021&prerelease

A .Net Core library of useful extension methods for the "string" class in C#.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net5.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated

+ Added "SubstringStart" method that selects everything from the start of the string to the first occurrence of a given substring.
+ Added "SubstringEnd" method that selects everything from the first occurrence of a given substring to the end of the original string.
+ Added "SubstringEndLast" method that selects everything from the last occurrence of a given substring to the end of the original string.
+ Added "SubstringStartLast" method that returns a substring from the start of the original instance to the last occurrence of the given "endString" argument.
+ Added better exception throwing for the "Selector" methods. Now if an exception is thrown by one of those methods it will be much more informative for the user.
+ Improved the function of all "substring" methods. Before they were looking for the indexes of their various "substring" parameters twice, that has been fixed and now they should be approx. twice faster.

= Trimmed overloads of all methods. Now there are only one or two overloads for a single method that achieve the same functionality as all the old overloads by use of optional parameters.
This change was made for two reasons:
1. The old strategy was to have multiple overloads, each with more parameters than the previous, thus providing more flexibility to the user. Since overloads with fewer parameters simply called overloads with one more parameter, passing a default value, this strategy has been deprecated in favour of having less (ideally only one) method/overload having the minimal amount of required parameters and the rest being optional. In this way the same functionality as before is achieved but the code is more maintainable and easier to read.
2. Being able to see what the default values for the optional parameters are will give the user more information about how the code is going to process his request. For example: by calling "Substring("test")" the user would not know how the string comparison is going to be performed. But seeing the default argument used for it will show him just that.

⚠ Changed the way the "Substring" method, which accepts a "length" argument, works. This is the method which returns a substring of length "length", starting from the first index at which a given "startString" occurs.
Before if the user wanted the method to include the given "startString" in the return result the method would not take into account the length of "startString" and would start counting from it's start. Thus the end result was one "startString" length shorter than what the user might have expected.
Now, if the user wants the return result to include the given "startString", the string, returned by the method will be "startString" + a substring of length "length", counted from the end of "startString".