It may be better (although possibly less efficient) to split up the current situation more:
Define a splitter that parses a string into (ReadOnlyMemory<char>, IsNumeric) splits.
For sequences of the splits, define a comparer.
The provided implementation of this comparer would be a composite comparer: one for numeric splits and one for non-numeric splits.
This would allow several extension points not currently possible with the current PR:
By providing a custom splitter and a custom numeric split comparer, decimals and/or negative numbers could be supported.
By providing a custom non-numeric split comparer, any kind of (sub)string comparer logic could be supported (currently, we are limited to StringComparison). E.g., handling spaces differently.
By providing a custom composite comparer, the user can change the ordering when a numeric split is compared with a non-numeric split.
It may be better (although possibly less efficient) to split up the current situation more:
(ReadOnlyMemory<char>, IsNumeric)
splits.This would allow several extension points not currently possible with the current PR:
StringComparison
). E.g., handling spaces differently.