Merge pull request #6173 from Bond-009/tests5

Add test for ReadOnlySpan.Count extension
This commit is contained in:
Claus Vium
2021-06-12 08:08:46 +02:00
committed by GitHub
3 changed files with 21 additions and 3 deletions

View File

@@ -1048,7 +1048,7 @@ namespace Emby.Server.Implementations.Data
// TODO The following is an ugly performance optimization, but it's extremely unlikely that the data in the database would be malformed
var valueSpan = value.AsSpan();
var count = valueSpan.CountOccurrences('|') + 1;
var count = valueSpan.Count('|') + 1;
var position = 0;
var result = new ItemImageInfo[count];