Removal of ToArray()

This commit is contained in:
Brett Hewitson 2021-12-16 00:21:23 +10:00
parent 9eb22da9e7
commit 9f5cf132f0
41 changed files with 184 additions and 189 deletions

View file

@ -18,7 +18,7 @@ namespace ArkData
return -1;
}
public static int[] Locate(this byte[] self, byte[] candidate)
public static IEnumerable<int> Locate(this byte[] self, byte[] candidate)
{
if (IsEmptyLocate(self, candidate, 0))
return Empty;
@ -29,7 +29,7 @@ namespace ArkData
list.Add(position);
if (list.Count != 0)
return list.ToArray();
return list;
return Empty;
}