Lasso Soft Inc. > Home

[Array->RemoveAll]

[Array->RemoveAll] removes any elements that match the parameter from the array. Accepts a single parameter of any data type. Returns no value.

Note: The specified elements in the array are removed and the indexes of all elements in the array above the index are adjusted down.

  • Syntax
  • Parameters
[Array->(RemoveAll: 'Find Value')]
Required Parameters
Array The array for which all elements should be removed.
Find Value The value of elements which should be removed from the array.
Examples

To find and remove an element from an array:

Use the [Array->RemoveAll] tag. The following example removes all entries for Friday from an array of the days of the week. The resulting array is output.

<?LassoScript
  Variable: 'DaysOfWeek'=(Array: 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');
  $DaysOfWeek->(RemoveAll: 'Fri');
  Output: $DaysOfWeek;
?>
Result:
(Array: (Sun), (Mon), (Tue), (Wed), (Thu), (Sat))
Tag Link [Array->RemoveAll] Category Array
Type Member Data Source Any
Support Preferred Version 5.0
Output Type None Security None
Implementation LCAPI Sets Lasso 7.0, Lasso 6.0, Lasso 5.0

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft