// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // // Creation Date: July 21, 1998 // // // // // // string[] stringArrayCatenate( string $string1[], string $string2[] ) // // // Returns a new string array which is the result of concatenating // the two given string arrays. // // // string $string1[] First string array // string $string2[] Second string array to be added to the first. // // // string[] : string array from concatenation // // // string $string1[] = {"light1", "light2"}; // string $string2[] = {"light3","light4","light5"}; // stringArrayCatenate($string1, $string2); // // Result: light1 light2 light3 light4 light5 // // // // global proc string[] stringArrayCatenate( string $string1[], string $string2[] ) { string $result[] ; int $i ; // copy the first over. // for( $i = 0 ; $i < size($string1) ; $i++ ) { $result[$i] = $string1[$i] ; } int $nr = size($result) ; // copy the second. // for( $i = 0 ; $i < size($string2) ; $i++ ) { $result[$nr+$i] = $string2[$i] ; } return $result ; }