Version 1.1.33

Date 2021-11-25 (1,092 days ago)
Downloads 3,634 downloads
NuGet View on NuGet
GitHub View on GitHub
Target Frameworks .NET Standard 1.1 .NET Standard 1.3 .NET Standard 2.0 .NET 4.5 .NET 4.6 .NET 4.7 .NET 4.8

#installation">Installation

#changelog">Changelog

  • Added StringExtensions.ToBoolean method overload (see d78f58d)
    The class already has the ParseBoolean method, but this being an extension method, the name should instead of ToBoolean. To ensure backwards compatibility, the ParseBoolean method is now marked as obsolete, and a new ToBoolean with the same implementation is added instead.

  • Introduced new StringExtensions.IfNullOrWhiteSpace extension methods (see 3ff3b92)
    For the first method, if it's passed a value that is either null, empty or white space, the specified fallback value is returned instead.

    The second method works in a similar way, but supports a fallback function instead. This is useful if the fallback value requires expensive lookups, as the function is only invoked when needed.

  • Introduced new StringExtensions.NullIfWhiteSpace extension methods (see 696732c)
    If the method is passed a value that is either empty or white space, a null value is returned; otherwise the input value is returned untouched.