Use range operator for substring extraction in StringSegment.ToString()

This commit is contained in:
Tyrrrz
2026-02-27 11:30:09 +02:00
parent 2d49146c74
commit 2e47c73388

View File

@@ -14,5 +14,5 @@ internal readonly record struct StringSegment(string Source, int StartIndex, int
public StringSegment Relocate(Capture capture) => Relocate(capture.Index, capture.Length);
public override string ToString() => Source.Substring(StartIndex, Length);
public override string ToString() => Source[StartIndex..EndIndex];
}