Пример #1
0
        private IOneDStringArray GetMergerResult(OneDStringArray array, HashSet <string> list)
        {
            var index = 0;

            foreach (var e in list)
            {
                array[index] = e;
                index++;
            }
            return(array);
        }
Пример #2
0
        public IOneDStringArray Concat(IOneDStringArray array)
        {
            int length = GetBiggerLength(array);
            var result = new OneDStringArray(length);

            for (var i = 0; i < result.Length; i++)
            {
                if (i < Length && i < array.Length)
                {
                    result[i] = this[i] + array[i];
                }
                else if (i < Length && i >= array.Length)
                {
                    result[i] = this[i];
                }
                else
                {
                    result[i] = array[i];
                }
            }
            return(result);
        }