Array.spliteach()

From ZCubes Wiki
Revision as of 04:22, 8 May 2020 by Devika (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Spliteach() finds the removes the character/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

determinant

inverse