var s = "hello world"; // AsSpan gives a window with no allocation ReadOnlySpan<char> span = s.AsSpan(); ReadOnlySpan<char> word = span.Slice(6, 5); Console.WriteLine(word.ToString());
a no-copy view over text