Skip to content

Conversation

dragon7307
Copy link
Member

Version 1.5 is out with many adjustments made to integrate as flawlessly as possible with .Net 9.

Due to the introduction of variable-length Split methods in .Net 9, our custom Split methods have been replaced as the default by the new versions.
This applies to all .Net versions as for versions prior to .Net 9 a custom implementation approximating the behaviour of the new methods has been provided by this package to ensure a smooth transition.
This decision helps maintain compatibility across .Net versions.
The old Split implementations are however still available as static methods on the ReadOnlySpanExtensions and SpanExtensions classes for ReadOnlySpan<T> and Span<T> respectively.
They provide a richer set of features with overloads for taking a number of splits and specifiyng a behaviour for when that count is reached.

Uprading Guide:

If you're upgrading from a version earlier than 1.5, beware that in order to access the old implementations you've been using an explicit reference to the class is needed.
So

    span.Split('.');

becomes

    ReadOnlySpanExtensions.Split(span, '.');

Span.Split() refers to the new built-in implementations for which a compatibility layer will be provided for versions before .Net 9 so that their use in your codebase can be facilitated across versions.

The ReadOnlyspanExtensions methods are supported in this version, but will be deprecated as soon as the .Net 9 versions catch up in features.

Full Changelog: https://github.com/draconware-dev/SpanExtensions.Net/blob/main/Changelog.md

@dragon7307 dragon7307 added this to the Version 1.5 milestone Nov 12, 2024
@dragon7307 dragon7307 merged commit 344044b into main Nov 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant