Add test for ReadOnlySpan.Count extension

This commit is contained in:
Bond_009
2021-06-12 00:56:09 +02:00
parent cfad97ff28
commit 5fb72951a0
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];