I’m looking to convert an array of string to ReadOnlySpan<ReadOnlySpan> to optimize a split algorithm.
Is it possible ? how ?
string[] separators;
ReadOnlyChar totalChars = stackalloc char[separators.Sum(s => s.Length)];
// Copy each string in continu
ReadOnlySpan<ReadOnlySpan> spanSeparators = stackalloc ReadOnlySpan<ReadOnlySpan>[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.