- Added `IEnumerable<TSource>.Product()` and `IEnumerable<TSource>.Product<TResult>(Func<TSource>, TResult)` for all built-in numeric types, computing the product of all (optionally transformed) elements
- Added `IList<T>.Fill(T)` and `IList<T>.Fill(T, int, int)`
- Added `IPAddress.IsIPv4()` and `IPAddress.IsIPv6()`
- Added `IReadOnlyList<byte>.Pack8Bit()`
- Added `IReadOnlyList<byte>.Pack16Bit()`
- Added `IReadOnlyList<byte>.Pack32Bit()`
- Added `IReadOnlyList<byte>.Pack64Bit()`
- Added `MemberInfo.HasCustomAttribute<T>()` and `MemberInfo.HasCustomAttribute(Type)`
- Added `defaultValue` overload for `MemberInfo.SelectFromCustomAttribute<TAttr, TReturn>()`
- Added `Random.Next<T>()` (returns a random field from a specified enum type)
- Added `Random.NextByte([byte[, byte]])`
- Added `Random.NextColorArgb()`, returning a random color in RGB space, including random alpha
- Added `Random.NextColorRgb()`, returning a random color in RGB space with alpha 255
- Added `Random.NextDouble(double[, double])`
- Added `Random.NextInt16([short[, short]])`
- Added `Random.NextSingle(float[, float])` (#34)
- Added `Random.NextUnitVector2()`
- Added `Random.NextUnitVector3()`
- Added `Random.NextRotation()`
- Added `Rune.Repeat(int)`
- Added `byte.IsEven()`
- Added `byte.IsOdd()`
- Added `byte.IsPrime()`
- Added `byte.UnpackBits()`
- Added `byte.RangeTo(byte)`, `byte.RangeTo(short)`, `byte.RangeTo(int)`, and `byte.RangeTo(long)`
- Added `int.Mod(int)`
- Added `int.RangeTo(int)`, and `int.RangeTo(long)`
- Added `int.UnpackBits()`
- Added `long.Mod(long)`
- Added `long.RangeTo(long)`
- Added `long.UnpackBits()`
- Added `sbyte.IsEven()`
- Added `sbyte.IsOdd()`
- Added `sbyte.IsPrime()`
- Added `sbyte.Mod(sbyte)`
- Added `short.IsEven()`
- Added `short.IsOdd()`
- Added `short.Mod(short)`
- Added `short.RangeTo(short)`, `short.RangeTo(int)`, and `short.RangeTo(long)`
- Added `short.UnpackBits()`
- Added `string.IsPalindrome()`
- Added `Stream.GetHash<T>()`
- Added `Stream.TryWriteHash<T>(Span<byte>, out int)`
- Added `Stream.ReadInt16([Endian])`
- Added `Stream.ReadInt32([Endian])`
- Added `Stream.ReadInt64([Endian])`
- Added `Stream.ReadUInt16([Endian])`
- Added `Stream.ReadUInt32([Endian])`
- Added `Stream.ReadUInt64([Endian])`
- Added `Stream.Write(short, [Endian])`
- Added `Stream.Write(int, [Endian])`
- Added `Stream.Write(long, [Endian])`
- Added `Stream.Write(ushort, [Endian])`
- Added `Stream.Write(uint, [Endian])`
- Added `Stream.Write(ulong, [Endian])`
- Added `TimeSpan.Ago()`
- Added `TimeSpan.FromNow()`
- Added `TimeSpanParser.TryParse` which supersedes `TimeSpanParser.Parse`
- Added `Sqrt()` and `ComplexSqrt()` for all built-in decimal types
- Added `All()` and `Any()` for `Span<T>` and `ReadOnlySpan<T>`, mimicking the corresponding methods in `System.Linq`
- Added `Sign()` for built-in numeric types. For unsigned types, this never returns -1
- Added `Type.Implements<T>()` and `Type.Implements(Type)` (#25)
- Added `Type.Inherits<T>()` and `Type.Inherits(Type)` (#25)
- Added `DigitalRoot` function for built-in integer types
- Added `Factorial` function for built-in integer types
- Added `HostToNetworkOrder` and `NetworkToHostOrder` for `short`, `int`, and `long`
- Added `IsLeapYear` function for `DateTime` and `DateTimeOffset`, as well as built-in numeric types
- Added `MultiplicativePersistence` function for built-in integer types
- Added `RotateLeft` and `RotateRight` for built-in integer types
- Added trigonometric functions for built-in numeric types, including `Acos()`, `Asin()`, `Atan()`, `Atan2()`, `Cos()`, `Sin()`, `Tan()` (#49)
- Added time-related extension methods for built-in numeric types, including `Milliseconds()`, `Seconds()`, `Minutes()`, `Hours()`, `Days()`, and `Weeks()`. `Ticks()` is also available, but only for integers; not floating point
- Added `StringBuilderReader` (inheriting `TextReader`) which allows reading from a `StringBuilder` without consuming the underlying string
- Added extension methods for `System.Decimal`
### Changed
- Updated to .NET 6 (#45)
- Methods defined to accept `byte[]` have been changed accept `IReadOnlyList<byte>`
- Extension methods are now defined in appropriate child namespaces to reduce the risk of name collisions (#7)
-`char[].Random(int)`, `char[].Random(int, int)`, `IEnumerable<char>.Random(int)`, and `IEnumerable<char>.Random(int, int)` have been redefined as `Random.NextString(IReadOnlyList<char>, int)`
-`IComparable<T>.Between(T, T)` has been redefined as `IComparable<T1>.Between(T2, T3, [InclusiveOptions])` to allow comparison of disparate yet comparable types, and also offers inclusivity options
-`DateTime` extensions now wrap `DateTimeOffset` extensions
-`DateTime.ToUnixTimestamp([bool])` has been redefined as `DateTime.ToUnixTimeMilliseconds()` and `DateTime.ToUnixTimeSeconds()`
-`Dictionary<T1, T2>.ToGetParameters()`, `IDictionary<T1, T2>.ToGetParameters()`, and `IReadOnlyDictionary<T1, T2>.ToGetParameters()`, has been redefined as `IEnumerable<KeyValuePair<T1, T2>>.ToGetParameters()`
-`Dictionary<T1, T2>.ToConnectionString()`, `IDictionary<T1, T2>.ToConnectionString()`, and `IReadOnlyDictionary<T1, T2>.ToConnectionString()`, has been redefined as `IEnumerable<KeyValuePair<T1, T2>>.ToConnectionString()`
-`IList<T>.OneOf([Random])` and `IEnumerable<T>.OneOf([Random])` have been redefined as `Random.NextFrom<T>(IEnumerable<T>)` to fall in line with the naming convention of `System.Random` (#21)
-`IList<T>.Shuffle([Random])` now uses a Fisher-Yates shuffle implementation
-`IList<T>.Shuffle([Random])` has been repurposed to shuffle the list in place, rather than returning a new enumerable
-`IEnumerable<T>.Shuffle([Random])` has been renamed to `IEnumerable<T>.Shuffled([Random])` to avoid confusion with `IList<T>.Shuffle([Random])`
-`Random.CoinToss()` has been redefined as `Random.NextBoolean()` to fall in line with the naming convention of `System.Random`
-`Random.OneOf<T>(T[])` and `Random.OneOf<T>(IList<T>)` have been redefined as `Random.NextFrom<T>(IEnumerable<T>)` to fall in line with the naming convention of `System.Random`
-`Enum.Next([bool])` and `Enum.Previous([bool])` have been redefined as `Enum.Next()`, `Enum.Previous()`, `Enum.NextUnchecked()`, `Enum.PreviousUnchecked()`. The `Unchecked` variants of these methods do not perform index validation, and will throw `IndexOutOfRangeException` when attempting to access an invalid index. The checked variants will perform a modulo to wrap the index
- Seperated `string.WithAlternative(string, [bool])` to `string.WithEmptyAlternative(string)` and `string.WithWhiteSpaceAlternative(string)`
-`string.AsNullIfEmpty()` and `string.AsNullIfWhiteSpace()` now accept a nullable `string`
-`IEnumerable<byte>.GetString([Encoding])` has been renamed to `IReadOnlyList<byte>.ToString` and its `Encoding` parameter has
been made non-optional
- Fixed a bug where `IEnumerable<KeyValuePair<K,V>>.ToConnectionString()` would not sanitize types with custom `ToString()`
implementation (#20)
Renamed `string.Random(int[, Random])` to `string.Randomize(int[, Random])`
- Redefined `char[].Random(int)`, `char[].Random(int, Random)`, `IEnumerable<char>.Random(int)`, and `IEnumerable<char>.Random(int, Random)`, as `Random.NextString(IReadOnlyList<char>, int)`
- Improved performance for:
-`string.IsLower()`
-`string.IsUpper()`
-`string.Reverse()`
-`TimeSpanParser`
### Removed
- Indefinitely suspended Unity support, until such a time that Unity can be updated to a newer version of .NET. See: https://forum.unity.com/threads/unity-future-net-development-status.1092205/
- Removed `IEnumerable<T>.Split(int)` - this functionality is now provided by .NET in the form of the `Chunk` method. See: https://docs.microsoft.com/en-us/dotnet/api/system.linq.enumerable.chunk?view=net-6.0
- Removed `WaitHandle.WaitOneAsync()`. For suspensions of execution during asynchronous operations, favour `TaskCompletionSource` or `TaskCompletionSource<T>`. See: https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.taskcompletionsource?view=net-6.0 and https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.taskcompletionsource-1?view=net-6.0