diff --git a/SabreTools.Matching/Extensions.cs b/SabreTools.Matching/Extensions.cs
index 0a2d4f7..fc4fba9 100644
--- a/SabreTools.Matching/Extensions.cs
+++ b/SabreTools.Matching/Extensions.cs
@@ -14,6 +14,19 @@ namespace SabreTools.Matching
return array == null || array.Length == 0;
}
+ ///
+ /// Find all positions of one array in another, if possible, if possible
+ ///
+ public static List FindAllPositions(this byte[] stack, byte[]? needle, int start = 0, int end = -1)
+ {
+ // Convert the needle to a nullable byte array
+ byte?[]? nullableNeedle = null;
+ if (needle != null)
+ nullableNeedle = Array.ConvertAll(needle, b => (byte?)b);
+
+ return FindAllPositions(stack, nullableNeedle, start, end);
+ }
+
///
/// Find all positions of one array in another, if possible, if possible
///