diff --git a/BeefLibs/corlib/src/Collections/List.bf b/BeefLibs/corlib/src/Collections/List.bf index 02d7d1a5..c334560b 100644 --- a/BeefLibs/corlib/src/Collections/List.bf +++ b/BeefLibs/corlib/src/Collections/List.bf @@ -812,6 +812,19 @@ namespace System.Collections return .Err; } + public Result GetAndRemoveStrict(T item) + { + int index = IndexOfStrict(item); + if (index >= 0) + { + T val = mItems[index]; + RemoveAt(index); + return val; + } + + return .Err; + } + public Result GetAndRemoveAlt(TAlt item) where TAlt : IHashable where bool : operator T == TAlt { int index = IndexOfAlt(item);