Calling Substring produces a copy of the extracted substring. By using AsSpan instead of Substring and calling the overload of string.Concat that accepts spans, you can eliminate the unnecessary string allocation. (cherry picked from commit e8aff90582fb50b2d48dea3a4c2139c2745f1554) Fixes #2262pull/2439/head
parent
0572bde41e
commit
6827ac5670
Loading…
Reference in new issue