// =========================================================================== // 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: 04 January 1999 // // Add string items to the end of a string array . A new string array // with the string items added is returned. Note that all of the input // and output string arrays may contain duplicate string items. // // flags: // string[] $items // A list of string values to add to the string array. // // string[] $list // A list of string values. // // returns: // string[] : Merged string array. // // examples: // string $array1[] = `sphere`; // // Result: nurbsSphere1 makeNurbSphere1 // // string $array2[] = `sphere`; // // Result: nurbsSphere2 makeNurbSphere2 // // string $sphereList[] = AWAppendStringsToStringArray($array1, $array2); // // Result: nurbsSphere2 makeNurbSphere2 nurbsSphere1 makeNurbSphere1 // // // Note: Use stringArrayAppend instead of this script // global proc string [] AWAppendStringsToStringArray( string $items[], string $list[]) { string $item, $listItem, $result[]; int $resultIndex = 0; // Copy the items currently in the list. // for ($listItem in $list) { $result[$resultIndex++] = $listItem; } // Add the new items to the list. // for ($item in $items) { $result[$resultIndex++] = $item; } // Return the new list. // return $result; }