mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-15 19:32:31 +00:00
Use range operator for substring extraction in StringSegment.ToString()
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user