// Copyright Epic Games, Inc. All Rights Reserved. using System; namespace EpicGames.Core { /// /// Extension methods for arrays. /// public static class ArrayExtensions { /// /// Converts an array of elements to a different type /// /// Type of the input elements /// Type of the output elements /// The array to convert /// Conversion function for each element /// Array of elements of the output type public static TOut[] ConvertAll(this TIn[] input, Func func) { TOut[] output = new TOut[input.Length]; for (int idx = 0; idx < input.Length; idx++) { output[idx] = func(input[idx]); } return output; } } }