Go to: Synopsis. Return value. MEL examples.
string[] groupObjectsByName( string $objectList[], string $token )
None
Variable Name | Variable Type | Description |
---|---|---|
$objectList | string[] | List of objects to be grouped |
$token | string | Separator at which the object grouping is defined |
string $objectList[] = { "curve1.cv[1]", "curve1.u[0.3]", "curve3.cv[2]", "curve4.cv[0]", "curve1.cv[0]" }; groupObjectsByName($objectList, "."); // Result : { "curve1.cv[1] curve1.u[0.3] curve1.cv[0]", // "curve3.cv[2]", "curve4.cv[0]" } // // The token is the string that limits the object name. Changing // the token gives different results. // groupObjectsByName($objectList, "["); // Result : { "curve1.cv[1] curve1.cv[0]", "curve1.u[0.3]", // "curve3.cv[2]", "curve4.cv[0]" } //