crozone/FormatWith
String extensions for named parameterized string formatting.
5 Releases
Latest: 5y ago
v3.0.1Latest
Release v3.0.1. Compile package with strong signing.
v3.0.0
This release adds the "{key:format}" syntax to FormatWith. This is a breaking change to the current format handler API. The format handler action that is passed to the FormatWith methods now receives (key, format) parameters instead of just (key). Also, if no handler is provided, the object will be formatted using the given format string using the built in string formatters (i.e. the same behaviour that string.Format uses). Special thanks to https://github.com/Jmaharman for implementing this feature.
v2.2.1
📋 Changes
- Added overloads to FormatWith and FormattableWith to allow passing a function for transforming each parameter key into a value.
- Improved performance on the object/anonymous class pattern overloads that use reflection.
- Internal code cleanup.
- Included XML documentation in the published NuGet package.
v2.0.3
📋 Changes
- Project now targets .NET Standard 2.0 (available on .NET Core 2.0, .NET Framework 4.6.1, and others)
- Removed seldom used custom formatter API, simplified internal code.
- Increased performance with simpler code, tokenizing text as structs.
- Added an extra set of short overloads to the main extension methods, to make them easier to use from languages that don't support default parameters. (Previously, all optional method parameters would be required for the long overload).
- Added support for FormattableString. Using the FormattableWith() method, the format string can be parsed into a FormattableString for custom formatting later.
- Improved README and csproj properties.
v2.0.0-alphaPre-release
