I’m looking to convert an array of string to ReadOnlySpan<ReadOnlySpan<Char>>
to optimize a split algorithm.
Is it possible? How?
string[] separators;
ReadOnlyChar<char> totalChars = stackalloc char[separators.Sum(s => s.Length)];
// Copy each string in continu
ReadOnlySpan<ReadOnlySpan<Char>> spanSeparators = stackalloc ReadOnlySpan<ReadOnlySpan<Char>>[separator.Length];
// Slice each string into
New contributor
Mickael Thumerel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.