diff options
| author | Bond_009 <Bond.009@outlook.com> | 2020-07-22 13:34:51 +0200 |
|---|---|---|
| committer | Bond_009 <Bond.009@outlook.com> | 2020-07-22 13:39:24 +0200 |
| commit | febb6bced6d2eb0941ed30205558ff8cf045720b (patch) | |
| tree | 829259605bb49dc01df569fee6e2919e51c47ecf /Emby.Naming/TV | |
| parent | 0750357916b600a4b4c27bc4babd2adcc6390473 (diff) | |
Review usage of string.Substring (part 1)
Reduced allocations by replacing string.Substring with ReadOnlySpan<char>.Slice
Diffstat (limited to 'Emby.Naming/TV')
| -rw-r--r-- | Emby.Naming/TV/SeasonPathParser.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Emby.Naming/TV/SeasonPathParser.cs b/Emby.Naming/TV/SeasonPathParser.cs index 2fa6b4353..d2e324dda 100644 --- a/Emby.Naming/TV/SeasonPathParser.cs +++ b/Emby.Naming/TV/SeasonPathParser.cs @@ -77,7 +77,7 @@ namespace Emby.Naming.TV if (filename.StartsWith("s", StringComparison.OrdinalIgnoreCase)) { - var testFilename = filename.Substring(1); + var testFilename = filename.AsSpan().Slice(1); if (int.TryParse(testFilename, NumberStyles.Integer, CultureInfo.InvariantCulture, out var val)) { |
