Skip to content

Commit 1e1e660

Browse files
committed
Revert "feat(util): new extension Array.Subarray"
This reverts commit b07694d.
1 parent 9008409 commit 1e1e660

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

AdventOfCode/Solutions/Utilities.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,6 @@ public static void Deconstruct<T>(this IList<T> list, out T first, out T second,
226226

227227
public static IEnumerable<T> IntersectAll<T>(this IEnumerable<IEnumerable<T>> input)
228228
=> input.Aggregate(input.First(), (intersector, next) => intersector.Intersect(next));
229-
230-
public static T[] Subarray<T>(this T[] array, int offset, int length = -1)
231-
{
232-
length = length != -1 ? length : array.Length - offset;
233-
T[] result = new T[length];
234-
Array.Copy(array, offset, result, 0, length);
235-
return result;
236-
}
237229

238230
//https://stackoverflow.com/questions/2641326/finding-all-positions-of-substring-in-a-larger-string-in-c-sharp
239231
public static IEnumerable<int> AllIndexesOf(this string str, string value)

0 commit comments

Comments
 (0)