Difference between revisions of "Array.spliteach()"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "Spliteach() finds the removes the chaacter/text from the array elements and removes the same. ==Examples== 1. MONTHS .chunks(3) .spliteach(/m/) The above example removes...")
 
Line 16: Line 16:
  
 
The above example removes characters 'm' and 'M' both, from the months March, May, September, November and December.
 
The above example removes characters 'm' and 'M' both, from the months March, May, September, November and December.
 +
 +
 +
==See Also ==
 +
 +
[[Array.determinant()]]
 +
 +
[[Array.inverse()]]

Revision as of 06:57, 20 April 2020

Spliteach() finds the removes the chaacter/text from the array elements and removes the same.

Examples

1.

MONTHS
.chunks(3)
.spliteach(/m/)

The above example removes character 'm' from the months September, November and December.


2. Ignoring case sensitivity of the characters

MONTHS
.chunks(3)
.spliteach(/m/i)

The above example removes characters 'm' and 'M' both, from the months March, May, September, November and December.


See Also

Array.determinant()

Array.inverse()